Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Rewriting any domain request

Am I on the right track?


wifi on the fly

2:26 am on Jun 8, 2004 (gmt 0)

10+ Year Member

Feels like day 10 on this.

I have a computer setup to take requests for non-paying customers. I can get to anywhere on mysub.domain.net, but if I try to go to www.abc.com Apache just hangs.

How do I tell Apache to take any request from any domain and throw them to this index.html?

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST}!^mysub.domain.net$
RewriteRule ^/(.*) [mysub.domain.net...] [L]
RewriteRule ^.*$ / [R=302,L]

Will this even work?


5:25 pm on Jun 9, 2004 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I suspect that the reason Apache 'hangs' is that your second RewriteRule is unconditional, thus putting Apache into an 'endless' redirection loop. RewriteCond directives only apply to the first RewriteRule that follows them.

I don't understand why you have two RewriteRules -- You may have a good reason, but you didn't say why.

I would suggest:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^mysub\.domain\.net
RewriteRule ^/ http://mysub.domain.net/index.html [R=302,L]


Featured Threads

Hot Threads This Week

Hot Threads This Month