Jump to content

hide id with mod_rewrite


raduenea

Recommended Posts

If you use mod-rewrite to hide the ID, it is no longer a variable - eg: you can't GET it from the URL without having it in the URL... instead, you should use a form and POST the id to the article display page.  Or just sanitize your GET variables...

Link to comment
Share on other sites

This can't be done purely via .htaccess, it's not magic, if the value isn't in the URL, then you can't use it in the script. You would need to update your script to fetch information from the database using 'article-title' instead of using the id (12). Basically you change the title to be the identifier of the article. Thus obviously it would need to be unique. Given the URL you describe it would seem you are already using mod_rewrite rules, these would just need a bit of tweaking to not match the id.

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.