试图让 www.example.com/test.php?archives=testing 到 www.example.com/archives/testing
根据godaddy的说法,他们默认启用了mod_rewrite
这是我的 .htaccess 文件:
rewriteengine on
rewritecond %{HTTP_HOST} ^example.com$
rewriterule ^example\/(.*)$ "http\:\/\/www\.example\.com\/$1" [R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^archives/(\w+)$ test.php?archives=$1 [L]
然而这不起作用,当我去 www.example.com/archives/test 我得到一个 404,建议