编辑htaccess时出现内部错误500

时间:2015-06-10 17:11:12

标签: apache .htaccess

当我编辑我的.htaccess文件时,服务器会重新调整500错误,但我确定我的.htaccess是好的。要测试,我只是在文件的末尾添加一行,当我上传它时,我有500错误。 你有什么想法吗?

我的.htaccess文件:

#URL REWRITING
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]


###############################################
#Rediriger tout le monde sauf une ip vers la page d'attente - Dé-COMMENTER EN CAS DE MAINTENANCE
#RewriteCond %{REQUEST_URI} !uploads/(.*)$
#RewriteRule .* maintenance.html [L]

###########################################################

### RETRAIT DU / SI MIS A LA FIN URL ###

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.+)/$ /$1 [R=301,L]

########################################

### REDIRECTION VERS LA PAGE DES TEXTURES ###
RewriteRule ^textures$ pages/textures.php [L]
RewriteRule ^textures/gerer/([a-zA-Z0-9-]+)$ pages/textures.php?page=gerer&action=$1 [L]
RewriteRule ^textures/gerer$ pages/textures.php?page=gerer [L]

### REDIRECTION VERS LA PAGE DES PILOTES ###
RewriteRule ^pilotes$ pages/pilotes.php [L]

### REDIRECTION VERS LA PAGE DE CONNEXION ###
RewriteRule ^connexion$ pages/connexion.php [L]
RewriteRule ^connexion/requis$ pages/connexion.php?type=requis [L]

### REDIRECTION VERS LA PAGE DE DECONNEXION ###
RewriteRule ^deconnexion$ scripts/logout.php [L]

### REDIRECTION VERS LA PAGE DES VOLS ###
RewriteRule ^vols$ pages/vols.php [L]

### REDIRECTION VERS LA PAGE DES VOLS EN COURS ###
RewriteRule ^live$ pages/live.php [L]

### REDIRECTION VERS LA PAGE DE LA FLOTTE ###
RewriteRule ^flotte$ pages/flotte.php [L]

### REDIRECTION VERS LA PAGE DE LA GALERIE ###
RewriteRule ^galerie$ pages/galerie.php [L]
RewriteRule ^galerie/ajouter$ pages/galerie.php?action=add [L]
RewriteRule ^galerie/gerer$ pages/galerie.php?action=gerer [L]

### REDIRECTION VERS LE CENTRE D HEBERGEMENT ###
RewriteRule ^upload$ pages/upload.php [L]
RewriteRule ^upload/administrer$ pages/upload.php?action=gerer [L]

### REDIRECTION VERS LA PAGE D'INSCRIPTION ###
RewriteRule ^inscription$ pages/inscription.php [L]

### REDIRECTION VERS LA PAGE EQUIPE ###
RewriteRule ^personnel$ pages/personnel.php [L]
RewriteRule ^personnel/contact$ pages/personnel.php?action=contact [L]
RewriteRule ^personnel/contact/([a-zA-Z0-9-]+)$ pages/personnel.php?action=contact&service=$1 [L]

### REDIRECTION VERS LES PAGES ADMIN ###
RewriteRule ^administration/utilisateurs$ pages/admin/utilisateurs.php [L]

RewriteRule ^administration$ pages/admin/admin.php [L]

RewriteRule ^administration/mail$ pages/admin/mail.php [L]
RewriteRule ^administration/mail/([a-zA-Z0-9-]+)$ pages/admin/mail.php?action=$1 [L]

RewriteRule ^administration/banniere$ pages/admin/banniere.php [L]
RewriteRule ^administration/banniere/([a-zA-Z0-9-]+)$ pages/admin/banniere.php?action=$1 [L]

RewriteRule ^administration/hubs$ pages/admin/hubs.php [L]
RewriteRule ^administration/hubs/gerer/editer/([0-9]+)$ pages/admin/hubs.php?action=modif_hub&hub_id=$1 [L]
RewriteRule ^administration/hubs/gerer$ pages/admin/hubs.php?action=gerer [L]

RewriteRule ^administration/securite$ pages/admin/securite.php [L]
RewriteRule ^administration/securite/([a-zA-Z0-9-]+)$ pages/admin/securite.php?action=$1 [L]

### REDIRECTION VERS AVATARS ###
RewriteRule ^avatar/([a-zA-Z0-9-]+).png$ scripts/avatar.php?pseudo=$1 [L]
RewriteRule ^avatar/ivao=([a-zA-Z0-9-]+).png$ scripts/avatar.php?pseudo=$1&param=ivao [L]
RewriteRule ^avatar/([0-9]+)=ivao=([a-zA-Z0-9-]+).png$ scripts/avatar.php?pseudo=$2&param=ivao&width=$1 [L]
RewriteRule ^avatar/([0-9]+)=([a-zA-Z0-9-]+).png$ scripts/avatar.php?pseudo=$2&width=$1 [L]

1 个答案:

答案 0 :(得分:0)

我将htaccess内容复制/粘贴到新的记事本文件中。然后我将其保存为 .htaccess ,我选择了 ANSI 字符集。