The Little Guy Posted March 14, 2007 Share Posted March 14, 2007 .htaccess Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)$ index.php?user=$1 [nc] http://tzfiles.com/album/Ryan header.php <?php echo'Viewing ('.$_GET['user'].'\'s) Profile'; ?> The above code echo's out index.php, I need it to echo out Ryan. I can't figure out what is wrong, and why it is doing this. I'm not sure, but I think it is something to do with the .htaccess file. header.php is in the root folder, the .htaccess is in a sub folder, and an index.php file is in the same folder as the .htaccess file. the index.php file includes the header.php file like so: include"../header.php"; Quote Link to comment https://forums.phpfreaks.com/topic/42747-_get-not-working-properly/ Share on other sites More sharing options...
WebGeek182 Posted March 15, 2007 Share Posted March 15, 2007 Have you tried adding a / before "index.php?user=$1"? Also you're typing in hxxp://www.yourdomain.com/Ryan (hxxp = http) and it's still coming out wrong? Quote Link to comment https://forums.phpfreaks.com/topic/42747-_get-not-working-properly/#findComment-207612 Share on other sites More sharing options...
The Little Guy Posted March 15, 2007 Author Share Posted March 15, 2007 If I do this: <?php echo $_SERVER['PHP_SELF'].'<br>'.$_SERVER['REQUEST_URI']; ?> I get this: /album/index.php /album/ryan This is when I use this url: http://tzfiles.com/album/ryan Quote Link to comment https://forums.phpfreaks.com/topic/42747-_get-not-working-properly/#findComment-207745 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.