Forum Moderators: phranque
RewriteEngine on
RewriteRule ^test/nyhet/(.*)/ /test/index.php?p=nyheter&id=$1
RewriteRule ^test/nyhet/(.*) /test/index.php?p=nyheter&id=$1 I have this .htaccess file in the root.
The meaning is that when i write:
www.my_webserver_is_not_nice_to_me.com/test/nyhet/12 OR
www.my_webserver_is_not_nice_to_me.com/test/nyhet/12/
I will come to:
www.my_webserver_is_not_nice_to_me.com/test/index.php?p=nyheter&id=12
Please help me. :(
Welcome to WebmasterWorld!
You may need to enable SymLinks if they're not already enabled. This is required by mod_rewrite.
You can also reduce your code to one rule by using "?" following the trailing "/" to make it optional.
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^test/nyhet/(.*)/? /test/index.php?p=nyheter&id=$1 [L]
Jim