mod_rewrite

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

mod_rewrite

Post by rsmarsha »

I have just started looking at mod_rewrite.

Would this rule

Code: Select all

RewriteEngine on 
RewriteRule ^page/([^/\.]+)/?$ ad_index.php?page=$1
Change

ad_index.php?page=adminorders

into

/page/adminorders

?

I know it's basic but just starting somewhere. :) I'm on shared hosting so not sure when they restart apache for me to test this. :)

Also anyone know a good tutorial on mod_rewrite? Nice and easy to understand please, hehe.

I'm not that familar with regular expressions, have used them now and again, but i'm no expert on them, so a pointer on a good place to read about them would help also.

Thanks all. :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Why not try it?
rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

Post by rsmarsha »

I did, it didn't see to do anything. :(

As far as i can see instead of typing :

url/ad_index.php?page=adminorders

i should be able to now type:

url/page/adminorders

It just says can't find the file.

Was also looking for a nice simple tutorial, or a book i can buy (in the uk). :)
Post Reply