justcraig Posted January 22, 2007 Share Posted January 22, 2007 I am once again stuck in my persuit of knowledge ...I need to make www.go.domain.com/username actually pull www.go.domain.com/index.php?username=usernameI have hit a brick wall and would much appreciate any help! Link to comment https://forums.phpfreaks.com/topic/35157-quicklink-with-either-php-or-htaccess/ Share on other sites More sharing options...
printf Posted January 22, 2007 Share Posted January 22, 2007 You new mod_rewrite[code]RewriteEngine on RewriteRule ^/(.*)$ /index.php?username=$1 [L][/code]If you need more control of the rewrite rule, then use [metacharacter] class to limit/restrict the matching (IE: ([a-z0-9_].+)) instead of (.*). But that depends on your username allowed characters!printf Link to comment https://forums.phpfreaks.com/topic/35157-quicklink-with-either-php-or-htaccess/#findComment-166030 Share on other sites More sharing options...
justcraig Posted January 22, 2007 Author Share Posted January 22, 2007 How far in the tree should i put the .htaccess file? only in that specific folder or what? Link to comment https://forums.phpfreaks.com/topic/35157-quicklink-with-either-php-or-htaccess/#findComment-166032 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.