shortysbest Posted May 29, 2010 Share Posted May 29, 2010 I have been able to get part of my url to rewrite correctly, but when it comes to having multiple &'s in url im not sure how to do this. currently i have three types of URL's that are formed in my site. 1st: www.*site*.com/index.php?node=home 2nd www.*site*.com/index.php?node=antiques&page=1 3rd www.*site*.com/index.php?node=product&id=1 right now my mod_rewrite file is RewriteEngine On RewriteBase / RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?node=$1&product=$2&page=$3 [L] RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?node=$1&product=$2&page=$3 [L] and it currently does rewrite the url from www.*site*.com/index.php?node=home to www.*site*.com/home but i am having trouble to get them to rewrite past the first & sign Link to comment https://forums.phpfreaks.com/topic/203314-mod_rewrite-trouble/ Share on other sites More sharing options...
cags Posted May 30, 2010 Share Posted May 30, 2010 What exactly is causing you trouble? You just match the next 'directory' of the URL and pass it on. RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?node=$1&product=$2&page=$3 [L] Link to comment https://forums.phpfreaks.com/topic/203314-mod_rewrite-trouble/#findComment-1065284 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.