Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-08-2007, 11:01 AM   PM User | #1
mauzzzie
New Coder

 
Join Date: Dec 2006
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
mauzzzie is an unknown quantity at this point
Internet Explorer htaccess url rewrite

Hi,

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?

Thanks!
mauzzzie is offline   Reply With Quote
Old 04-08-2007, 12:41 PM   PM User | #2
Bill Posters
Senior Coder

 
Join Date: Feb 2003
Posts: 1,665
Thanks: 0
Thanked 27 Times in 25 Posts
Bill Posters will become famous soon enough
iirc...

Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^[-_a-zA-Z0-9]/?$ index.php?p=$1
Alternatively, if you have a set number of options, you can be more explicit, if you want...

Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^([home|about|section3|section4])/?$ index.php?p=$1
Bill Posters is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:47 AM.


Advertisement
Log in to turn off these ads.