开发者

Add omitted ? to URLs

I am working on a website with a CMS that reads the page as the name of the query string, e.g. http://exmaple.com/?pagename. I am trying to create a rewrite rule to rewrite it to with the ?.

So, a user types in /pagename开发者_如何学编程 and is really taken to /?pagename


Try this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f    
RewriteRule ^/?(.*) index.php?$1 [L]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜