Hey,
I have been trying to get this working for a while now, and im not that familiar with mod rewrite myself so i thought i might be able to get some help
I have users.site.com as my user base.
I want users.site.com/user eg users.site.com/bob to be written as user.php?user=bob
So i have this htaccess file inside the users folder:
RewriteEngine on RewriteRule /(.*)$ /user.php?user=$1
Well it used to get to the user.php page, but now it just displays a 404 error 😐
When it did actually get to the 404 error though, it would just give me error.php (my error page)
Im my main / directory i have in htaccess:
ErrorDocument 400 /errors/error.php?e=404
ErrorDocument 401 /errors/error.php?e=401
ErrorDocument 403 /errors/error.php?e=403
ErrorDocument 404 /errors/error.php?e=404
ErrorDocument 500 /errors/error.php?e=500
Options -Indexes
<Files ~ "\.inc.php$">
Order allow,deny
Deny from all
Satisfy All
</Files>
So now im unsure what to do 😢
The php code inside user.php is (very complex, im just testing this remember 😉):
<?php
if($_GET['user']){
echo "The user specified is: $_GET['user']";
}
else {
echo "No user specified";
}
?>
So remember, i want users.site.com/anything to go to users.php?user=anything
Thanks for all your help 🙂
Regards,
Matt