【发布时间】:2014-12-31 10:50:51
【问题描述】:
我在我唯一的.htaccess 文件中完成的代码:
Options FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule blue-world.pl/([a-z]+)(?:/([a-z]+))? index.php?nav=$1#$2
我需要将blue-world.pl/name/name2 重定向到blue-world.pl?nav=name#name2。如何做到这一点使其工作BOTH:本地主机和服务器。
在 MAMP 中我尝试输入:localhost/scregal.blue-world.pl/title 我看到了:
The requested URL /scregal.blue-world.pl/title was not found on this server.
以下是我在 localhost 中的文件层次结构:
scregal.blue-world.pl
- .htaccess
- index.php -> var_dump($_GET)
httpd.conf 中有以下几行:
LoadModule rewrite_module modules/mod_rewrite.so
AllowOverride All
【问题讨论】: