dzhax Posted July 11, 2010 Share Posted July 11, 2010 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 More sharing options...
dzhax Posted July 11, 2010 Author Share Posted July 11, 2010 anyone?? Link to comment Share on other sites More sharing options...
Synook Posted July 11, 2010 Share Posted July 11, 2010 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 More sharing options...
chibineku Posted July 11, 2010 Share Posted July 11, 2010 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 More sharing options...
wirehopper Posted July 11, 2010 Share Posted July 11, 2010 Unless you're building a CMS to learn - I'd recommend using an existing system. Link to comment Share on other sites More sharing options...
dzhax Posted July 12, 2010 Author Share Posted July 12, 2010 Well it is kinda for learning, but also for just personal use. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.