How do I get my site example.com so that when I go to example.com/Josh it shows example.com/profile.php?user=Josh Thanks.
Create a .htaccess file with this in it: RewriteEngine On RewriteRule ^(.*)$ profile.php?user=$1 [QSA,L] Code (markup):
My bad but can I actually have it so its example.com/user/Josh instead of example.com/Josh as that messes up all of my files. Sorry.
If profile.php is in the root directory then it would be: RewriteEngine On RewriteRule ^user/(.*)$ profile.php?user=$1 [QSA,L] Code (markup): or if profile.php was in the directory "user" then it'd be RewriteEngine On RewriteRule ^user/(.*)$ user/profile.php?user=$1 [QSA,L] Code (markup):