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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.