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! Link to comment https://forums.phpfreaks.com/topic/24944-mod_rewrite/ 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] Link to comment https://forums.phpfreaks.com/topic/24944-mod_rewrite/#findComment-113724 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 Link to comment https://forums.phpfreaks.com/topic/24944-mod_rewrite/#findComment-113782 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? Link to comment https://forums.phpfreaks.com/topic/24944-mod_rewrite/#findComment-116068 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. Link to comment https://forums.phpfreaks.com/topic/24944-mod_rewrite/#findComment-116090 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.