httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T F <>
Subject [users@httpd] detail for a rewrite
Date Sun, 11 Dec 2005 08:28:59 GMT
My hosting service has my second domain name aliased to my single account.

For example, is aliased to

If a user points their browser to, then they are served

If the they point to, then they are served

In my .htaccess file, the following accomplishes this (but there is a

RewriteEngine on
RewriteCond %{HTTP_HOST}   ^www\.domain\.net [NC]
RewriteRule ^$   [R]

If the user points to (with a trailing slash), then
everything is fine.

But if they omit the trailing slash, then the url becomes (note the .com)

I'd like for the url to remain .net.

In fact, i'd like to devise a general solution, such that whenever any
document in the the /o tree is requested, then the url will be rewritten to
the .net.  For example if the user pointed,
then it would be rewritten to

I've tried a number rewrite conditions and rules, and have consulted

Any help would be greatly appreciated.

Thanks in advance,

View raw message