doddsey_65 Posted June 13, 2010 Share Posted June 13, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/204614-need-help-understanding-mod_rewrite/ Share on other sites More sharing options...
cags Posted June 13, 2010 Share Posted June 13, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/204614-need-help-understanding-mod_rewrite/#findComment-1071390 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.