【发布时间】:2012-05-01 19:43:12
【问题描述】:
我必须使网址不区分大小写。这意味着我必须工作 http://www.test.com/About.php 和 http://www.test.com/about.php.. 我尝试了下面的代码。但它不起作用。它显示了索引页面。即,它显示了索引页面的内容
#Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
【问题讨论】:
-
这就是这些重写的用途:每个 URL 都应该转到
index.php- 如果不存在该请求的文件。那么您的实际问题是什么? -
我必须使 url 不区分大小写..现在 test.com/About.php 有效,但 test.com/about.php 无效。它显示索引页面