Jump to content

Mod_Rewrite


dzhax

Recommended Posts

Ok well i have been working on a CMS and i am using mod_rewrite so the people can not see the strings, and for my .httaccess script it is making me have to have it like http://www.website.com/index.php/home/2/3/ instead of http://www.website.com/home/2/3/Here is my script that i have atm in my httaccess file:

RewriteEngine onRewriteRule ^/?([a-zA-Z_]+)/([a-zA-Z_]+)/([a-zA-Z_]+)$ index.php?p=$1&id=$2&id2=$3 [L]

Well hope someone can help me.

Link to comment
Share on other sites

Well, you have said that you want the address to match ^/?([a-zA-Z_]+)/([a-zA-Z_]+)/([a-zA-Z_]+)$, which "/home/2" won't...

Link to comment
Share on other sites

Synook makes the point perfectly - either change the number of captured strings, or you can always have a double forward slash:http://www.website.com//home/2It's ugly, though - fixing the RewriteRule would be better.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...