简体   繁体   中英

HTAccess rewrite dynamic page url

thanks for your help in advance

Basically i have made a dynamic url website http://planet-dj-surrey.com/

I cant seem to figure out the code for the htaccess file to redirect a dynamic page and make it cleaner.

for example i want http://planet-dj-surrey.com/index.php?page=designprocess to be changed to

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]

Thanks in advance

Here is a simple example:

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

You need to lose the leading slash:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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