【发布时间】:2010-10-23 00:06:49
【问题描述】:
我正在本地开发应用程序(在域名
为了使用友好的 url,我已经像这样设置了我的 .htaccess:
RewriteEngine on
# Externally redirect to add missing trailing slash
RewriteRule ^(([a-z0-9._\-]+/)*[a-z0-9_\-]+)$ http://example.com/$1/?%{QUERY_STRING}[NC,R,L]
RewriteRule ^about/$ about.php [NC,L]
RewriteRule ^issues/$ issues.php [NC,L]
RewriteRule ^issue/([a-z0-9_\-]+)/$ issue.php?slug=$1 [NC,L]
SetEnv PHP_VER 5
IndexIgnore *
Options +FollowSymLinks
它工作正常。烦人的是,上网的时候就不是那么好了:
http://example.com/issue/my-slug/#23 不返回 GET 变量。为什么?
【问题讨论】:
-
mydomain.eu/issue/my-slug/#23 的正确重定向目标是什么?
标签: .htaccess mod-rewrite friendly-url