【发布时间】:2009-12-16 16:44:25
【问题描述】:
我想知道如何在我的网址末尾添加句点。目前,如果我有网址:
http://www.mydomain.com/Page/I.D.K.
获取信息的页面会返回
书名:I.D.K(没有结束句号)
这也发生在其他标点符号上,它会影响我的页面错误地显示信息。感谢您的关注,希望有人知道解决方案。
我在我的 htaccess 文件中使用以下内容:
RewriteRule ^([^/.]+)/?$ /index.php?Page=$1 [L]
RewriteRule ^([^/.]+)/([^/]+)/?$ /index.php?Page=$1&Level1=$2 [L]
RewriteRule ^([^/.]+)/([^/]+)/([^/]+)/?$ /index.php?Page=$1&Level1=$2&Level2=$3 [L]
RewriteRule ^([^/.]+)/([^/]+)/([^/]+)/([^/]+)/?$ /index.php?Page=$1&Level1=$2&Level2=$3&Level3=$4 [L]
【问题讨论】:
-
你能用 Markdown 格式化你的 .htaccess 文件吗?这将使我们更容易阅读和帮助您。谢谢!
标签: .htaccess mod-rewrite punctuation