Jump to content

Remove ID from URL clarification.


biggieuk

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.

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.