httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: Redirecting URLS...
Date Thu, 15 Aug 2002 14:12:54 GMT
>From: Matthijs Rohs [mailto:matthijs@rohs.nl]
>
>When I put this in my .htaccess (mod_rewrite is loaded):
>
>RewriteCond %{HTTP_HOST} ^home.rohs.nl$
>RewriteCond %{REQUEST_URI} !^/home/
>RewriteRule (.*) /home/$1
>
>Then when someone loads http://home.rohs.nl/ that person will 
>see what's in http://rohs.nl/home/ so it is possible with .htaccess.
>
>So I thought it was possible, with mod_rewrite for example, to do the
>same with http://www.rohs.nl/ to http://rohs.nl/
>
>Guess not according to you :)

It depends... You can only rewrite requests which end up in your directory. So it must be
that your ISP has made home.rohs.nl a ServerAlias of rohs.nl.

If this is true, then without your rewrite rule, http://home.rohs.nl should lead to the same
site as http://rohs.nl...

So if your ISP will make www.rohs.nl a ServerAlias too, then you can do a rewrite rule as
well if you want to map www.rohs.nl onto a subdirectory.

It all depends on your server config - if www.rohs.nl is already a ServerAlias of your primary
domain name (rohs.nl) then yes, you can rewrite it because is already leads into your directory.
However, if it does not lead into your directory already, you cannot make it do so with out
altering the server config.

Rgds,

Owen Boyle

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message