Jump to content

Dynamic ID not rewriting...


starboy

Recommended Posts

So I have a bunch of unique pages I'm populating with _GET from the value in my url (noob stuff)

 

But after doing numerous amounts of research I CAN NOT get it to rewrite the URL..

 

Example url

 

localhost/detail.php?id=20

I want the above to be..

localhost/detail/20

 

this is what I have currently in my .htaccess

 

RewriteEngine On

RewriteRule ^details/([0-9]+)/?$    detail.php?id=$1    [NC,L]    # Handle detail requests

 

(ps. I thought maybe I didn't have Apache configured correctly by I can redirect index.php to anything)

Link to comment
Share on other sites

What URL are you requesting, your rewrite looks correct assuming you type yourdomain.com/details/10 (or enquiries if your second post was supposed to indicate that was a typo in your first) in your browsers address bar you should get served yourdomain.com/details?id=10

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.