Возможный дубликат:
Все, что вы когда-либо хотели знать о правилах Mod_Rewrite, но боялись спросить?
Я вернулся к этому, поскольку на протяжении многих лет был в стороне от других вещей. Итак, пожалуйста, найдите мои подробности ниже, с этими подробностями я все еще получаю следующую ошибку:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
мой URL:
localhost/exp/index.php
Мой htaccess:
RewriteEngine On
RewriteRule (.*?)/(.*?)/(.*?)$
exp/index.php?page=$1&action=$2&id=$3
Теперь, если я закомментирую все, кроме 'RewriteEngine On'
RewriteEngine On
#RewriteRule (.*?)/(.*?)/(.*?)$
#exp/index.php?page=$1&action=$2&id=$3
мой / и т. Д. Подробная информация о файле /apache2/httpd.conf приведена ниже:
<Directory />
Options Indexes MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/Library/WebServer/Documents/">
Options Indexes MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Mac Snow Leopard. Мой каталог находится в DocumentRoot "/ Library / WebServer / Documents", и я не использую обычный http: // localhost / ~ User / но http: // localhost / ?? и т.д.
Это могло бы или не могло, но просто заметил, что если я перечисляю свои каталоги, просто перейдя на localhost, тогда папка, которую я использую, не видна ??? в списке других папок
Так что, хоть убей, я не знаю, что происходит.
Попробуйте:
RewriteEngine On
RewriteRule ^(.*?)/(.*?)/(.*?)$ /exp/index.php?page=$1&action=$2&id=$3