开发者

clean url for htaccess

How can I convert this url

http://loc开发者_JS百科alhost/cms/index.php?page=register

to this

http://localhost/cms/page/register.html

Please help... I'm not that good in htaccess.


Try this to make it work like you wish: :)

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} \/cms\/index\.php
RewriteCond %{QUERY_STRING} page\=(.*)
RewriteRule (.*)$ /cms/page/%1.html

Let me know in case of any issue... :)


Try This

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^cms/([0-9]+)-([a-z]+) http://localhost/cms/index.php?page=$1-$2 [NC]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜