SharkBait Posted October 24, 2006 Share Posted October 24, 2006 HI, I can't remember what is it called and I know there have been lots of posts about it but can't for the life of me remember.I want to take the URL myscript.php?action=product&id=2343 and change the url to read myscript.php/product/myProductI'd love to get into the debate on whether or not Google/MSN/Yahoo etc do better with their crawlers in this fashion as well but I'm sure that would have to be started in another section here at PHPFreaks ;)Thanks! Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 24, 2006 Share Posted October 24, 2006 Something like this should do:[code]RewriteRule ^product/([0-9+)$ myscript?action=product&id=$2[/code] Quote Link to comment Share on other sites More sharing options...
SharkBait Posted October 24, 2006 Author Share Posted October 24, 2006 Now does this go into the httpd.conf Quote Link to comment Share on other sites More sharing options...
SharkBait Posted October 28, 2006 Author Share Posted October 28, 2006 Does this look right?[code]RewriteEngine OnRewriteRule ^entry/([0-9])$ entry.php?d=$1[/code]It doesnt seem to be working. The mod_rewite is loaded into apache. What else can I check?omg I'm dumb.. i figured out what I was doing wrong. :-\ Though the issue I am having now is because the url looks like www.tingram.ca/blog/1 the images and things are not loading properly because they are set up like img src="images/blah.jpg"is there something I can do to make this correct? Quote Link to comment Share on other sites More sharing options...
SharkBait Posted October 28, 2006 Author Share Posted October 28, 2006 This is how the page should look like: www.tingram.ca/entry.php?id=18This is how it is showing up with the mod_rewrite www.tingram.ca/blog/18Now it looks like somehow the mod_rewrite has stopped the CSS to load, but the mysql connection stuff and functions all work fine. I'm confused** FixedI just added a / before the tags in HTML and it works nicely. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.