Link to home
Start Free TrialLog in
Avatar of SWB-Consulting
SWB-Consulting

asked on

Virtual Directory

I use Apache 1.3

I'd like to have a virtual directory so that when the user accesses
http://localhost/somedirectory/ he in fact accesses http://localhost/ but thinks he's in http://localhost/somedirectory/

Thanks,
Nima
Avatar of SWB-Consulting
SWB-Consulting

ASKER

one more thing: i want it to be done in the htaccess file not in the httpd.conf
use mod_rewrite:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/$
RewriteRule ^/somedirectory(.*)$ /$1 [R,L]
I tried it in the .htaccess but it didn't work. It didn't find the address http://localhost/domedirectory/
which .htaccess, that in domedirectory?
you better write these rules in httpd.conf
ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial