HTAccess重写动态页面网址 [英] HTAccess rewrite dynamic page url
本文介绍了HTAccess重写动态页面网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
感谢您的提前帮助
基本上我已经创建了一个动态URL网站http://planet-dj-surrey.com/
Basically i have made a dynamic url website http://planet-dj-surrey.com/
我似乎无法找出htaccess文件的代码来重定向动态页面并使它更整洁.
I cant seem to figure out the code for the htaccess file to redirect a dynamic page and make it cleaner.
例如我想要http://planet-dj-surrey.com/index.php?page=designprocess
更改为
http://planet-dj-surrey.com/designprocess/
目前我有这个,但它似乎没有用,
currently i have this but it does not seem to be working,
RewriteEngine On
RewriteRule ^/dropdownchoice/$ index.php?page=dropdownchoice [NC]
预先感谢
推荐答案
您需要丢掉斜杠:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ index.php?page=$1 [NC]
这篇关于HTAccess重写动态页面网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文