Jump to content

need help understanding mod_rewrite


doddsey_65

Recommended Posts

okay i have a htaccess file which reqrites

profile.php?username=username

to

profile/username/username.html

 

Do i now need my href links to point to the second url instead of the dynamic one?

I have done this and it loads the page profile/usewrname/username.html but the information

i am supposed to get from $_GET['username'] doesnt show up and its just a blank section.

 

 

Link to comment
Share on other sites

This is a common misconception. I highly doubt you have re-written from profile.php?username=username to profile/username/username.html, you are infact doing the opposite, which means, yes, you should be chaning all hrefs to point at profile/username/username.html rather than the alternative. If the $_GET['username'] is empty try print_r($_GET), just incase you spelt something wrong, if that doesn't work then you will have to show us what your current rewrite rules are.

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.