本文介绍了HTAccess重写动态页面网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
感谢您的提前帮助
基本上我已经创建了一个动态URL网站planet-dj-surrey/
Basically i have made a dynamic url website planet-dj-surrey/
我似乎无法找出htaccess文件的代码来重定向动态页面并使它更整洁.
I cant seem to figure out the code for the htaccess file to redirect a dynamic page and make it cleaner.
例如我想要planet-dj-surrey/index.php?page=designprocess 更改为
planet-dj-surrey/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重写动态页面网址
发布评论