Jump to content

Recommended Posts

Hi all,

 

I just need clarification on a mod_rewrite issue im having.

 

I currently have links like so:

 

www.website.com/12/blah-blah-blah

 

which are already being re-written from:

 

www.website.com/index.php?id=12 (blah-blah-blah is just random useless text to make it look pretty)

 

Is it possible to remove the 12 part using mod_rewrite or am i going to need some sort of redirect page inbetween?

 

Thanks for your help!

Link to comment
https://forums.phpfreaks.com/topic/200775-remove-id-from-url-clarification/
Share on other sites

And without the 12 in the link how is it going to know what link to open? Magic?

 

The only real solution would be to create a permalink field in your database that would be used instead of the id. This would essentially be an id but in the form of a string rather than an id number. Therefore blah-blah-blah, wouldn't just be there to make it pretty it would be the unique ID for the row in the database.

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.