문제

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

도움이 되었습니까?

해결책 2

You need to lose the leading slash:

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

다른 팁

Here is a simple example:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^post-(.*)-([0-9]+)\.html$ post.php?post_name=$1&post_id=$2 [L]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top