Page 1 of 1

mod_rewrite

Posted: Fri Apr 28, 2006 2:37 am
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. :)

Posted: Fri Apr 28, 2006 8:07 am
by feyd
Why not try it?

Posted: Fri Apr 28, 2006 8:58 am
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). :)