Forum Moderators: phranque
RewriteCond %{REQUEST_FILENAME}!-d
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^(.*) [domain.com...]
and in error.php this code:
$dir = substr($dir, 0, -1);
$dir=explode('/',$dir);
$dir = end($dir);
echo "User <b>".$dir."</b> does not exist!";
With this codes when i digit in the address bar for example:
[non_existent_domain.mydomain2.com...]
It redirects to:
[domain.com...]
and it works! But i'd like to NOT view in the address bar the completely path...
I'd like to view only:
[domain.com...]
How can i do?
Thanks you all
Bye
The REQUEST_FILENAME is a folder (for e.g john) in the path "/home/web/www.domain.com/website/john/",now
in the "RewriteRule ^(.*) [domain.com...] the "$1" simbol has as value "/home/web/www.domain.com/website/john/" so i will get [domain.com...]
My problem is that i'd like to get simply [domain.com...]
How can i do that?
Thank you
RewriteBase /home/web/www.domain.com/website/
It really looks to me like a basic configuration problem.
Anyway, the problem can still be fixed in the rewrite code, but I suspect that if you do fix it there rather than in the server configuration, you will keep running into related problems in the future.
Jim