我的代码:删除.PHP并保留查询字符串
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteRule ^(.*).php(.*) $1$2 [NC]
我想使用它,以便
www.example.com/test.php?a=not&b=23
显示在URL为:
www.example.com/test?a=not&b=23
,也没有www重定向到www。
我的错误是: 404 not found. The URL /test not found on this server
任何想法?
任何想法是什么?怎么了? –
我收到错误:404找不到。未在此服务器上找到URL /测试。 – David19801
这个诊断信息应该在问题中。 –