Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: htaccess url rewrite
04-08-2007, 11:01 AM #1
- Join Date
- Dec 2006
- Thanked 0 Times in 0 Posts
htaccess url rewrite
I am trying to create good looking urls for my website. But after reading several tutorials it still does not work the way I do it.
I'd like to change www.mywebsite.com/?p=home
to be seen by surfers as www.mywebsite.com/home
but still it needs to be rewritten to the first, in order to make the site work off course.
I also tried with reg.ex. but this makes the site not show the css since this is rewritten as well....
There are only little few pages where I'd like to do this. So I guess using a reg.ex. is required. I can just set them manually by hand.
Could anyone please give me some feedback or tips on this subject?
04-08-2007, 12:41 PM #2
- Join Date
- Feb 2003
- Thanked 27 Times in 25 Posts
Alternatively, if you have a set number of options, you can be more explicit, if you want...Code:Options +FollowSymlinks RewriteEngine on RewriteRule ^[-_a-zA-Z0-9]/?$ index.php?p=$1
Code:Options +FollowSymlinks RewriteEngine on RewriteRule ^([home|about|section3|section4])/?$ index.php?p=$1