繁体   English   中英

HTAccess重写动态页面网址

[英]HTAccess rewrite dynamic page url

感谢您的帮助

基本上我已经建立了一个动态的网址http://planet-dj-surrey.com/

我似乎无法找出htaccess文件的代码来重定向动态页面并使其更清晰。

例如,我想将http://planet-dj-surrey.com/index.php?page=designprocess更改为

http://planet-dj-surrey.com/designprocess/

目前我有这个,但它似乎没有工作,

RewriteEngine On
RewriteRule   ^/dropdownchoice/$   index.php?page=dropdownchoice  [NC]

提前致谢

这是一个简单的例子:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^post-(.*)-([0-9]+)\.html$ post.php?post_name=$1&post_id=$2 [L]

你需要失去领先的斜杠:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ index.php?page=$1  [NC]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM