dezkit Posted February 27, 2009 Share Posted February 27, 2009 I have an index.php page where there are if statements to see if the $url is equal to, for example, home. In my .htaccess page I have made so that index.php?url=home is going to be /home. RewriteEngine on RewriteRule ^([^/\.]+)/?$ /index.php?url=$1 [L] If i go to a link such as /home?link=hello and in the /home it says "echo $_GET["link"]", it doesn't work. Thanks guys. Link to comment https://forums.phpfreaks.com/topic/147239-why-cant-i-use-the-get-method-on-a-mod_rewrited-page/ Share on other sites More sharing options...
wildteen88 Posted February 27, 2009 Share Posted February 27, 2009 with that url everything is being rewriten to index.php?url=/home?link=hello Link to comment https://forums.phpfreaks.com/topic/147239-why-cant-i-use-the-get-method-on-a-mod_rewrited-page/#findComment-772945 Share on other sites More sharing options...
dezkit Posted February 27, 2009 Author Share Posted February 27, 2009 with that url everything is being rewriten to index.php?url=/home?link=hello So what do I do so the script fits my needs? Thanks for the reply Link to comment https://forums.phpfreaks.com/topic/147239-why-cant-i-use-the-get-method-on-a-mod_rewrited-page/#findComment-772949 Share on other sites More sharing options...
laffin Posted February 28, 2009 Share Posted February 28, 2009 well think of a better system, instead of the catchall situation yer making. home?link=hello lends me to believe ya have different pages home page1 page2 so question is if u have home.php page1.php and so forth, why do u need link parameter? so the question ya pose makes no difference, as nobody knows the design or purpose. once ya come up with a purpose & design, than ya can begin the coding. Link to comment https://forums.phpfreaks.com/topic/147239-why-cant-i-use-the-get-method-on-a-mod_rewrited-page/#findComment-772953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.