Final Fantasy - Debt Consolidation - Computers 2007 - Mobile Phones - Myspace Comments

PDA

View Full Version : mod_rewrite


egdcltd
Apr 9th 2005, 4:02 pm
Can anyone recommend a really simple tutorial for using mod_rewrite to convert PHP URLs into static URLs?

LGRComp
Apr 9th 2005, 8:21 pm
I found this to be a fairly easy tutorial to follow. It might help.

http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html

dustin
Apr 9th 2005, 8:53 pm
This is a guide that has some common situations and the code to use:

http://httpd.apache.org/docs-2.0/misc/rewriteguide.html

egdcltd
Apr 10th 2005, 1:54 am
Thanks, but I am still having problems
Options +FollowSymLinks
RewriteEngine on
RewriteRule article_(.*)\.html$ /more/article/article.php?id=$1
RewriteRule search_(.*)\.html$ /more/article/search.php?cid=$1
Now the first rewrite rule works fine, converting URLs from e.g. article.php?id=1 to article_1.html. The second rule doesn't do anything, and I can't figure out why

WhatiFind
Apr 11th 2005, 2:14 pm
You can also check this forums http://mod-rewrite.com/forum/ I've found it very useful.

egdcltd
Apr 12th 2005, 2:39 pm
You can also check this forums http://mod-rewrite.com/forum/ I've found it very useful.
Thanks for the link.

miko67
Apr 12th 2005, 3:24 pm
check this forums http://mod-rewrite.com/forum/ yup, me too now. Thx a lot for a good link :)