Jump to content

mod_rewrite


SharkBait

Recommended Posts

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/myProduct

I'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

Does this look right?

[code]
RewriteEngine On
RewriteRule ^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

This is how the page should look like: www.tingram.ca/entry.php?id=18

This is how it is showing up with the mod_rewrite www.tingram.ca/blog/18

Now 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

** Fixed

I 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

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.