IMHO, no. Mod Rewrite generally focuses on aspects of URL Rewriting,
what you are trying to achieve is mask the actual URL of the location
where you are redirecting visitors to you site.Insert the following
lines in your conf

<VirtualHost sub.main.com:80>
        ServerName sub.main.com
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^sub.main.com$
        RewriteRule ^(.*)$ http://ext.org$1 [L]
        ErrorLog /where/your/logs/are
</VirtualHost>

If you want to mask the URL i would suggest you call the content of
ext.org/index.php within your page that you the user would stay on
your server (and hence see the desired URL)

hope this helps. 

Andy.

-- 
ANAND KAPOOR

Hai Jazba-e-Junoon, tho Himmat na haar! Justuju joh kurreh voh chueh Aasmaan!

If you have the Spirit of Passion(Obsession), Never give up! The one
who Perseveres reaches the Stars.



On Sun, 20 Mar 2005 05:00:42 -0800 (PST), Bhaskar Ghose
<[EMAIL PROTECTED]> wrote:
> Hi,
> I am a newbie to mod_rewrite and I just wanted to know the rewrite rule
> for my problem.
> I have a server say `main.com' and i am redirecting all requests to the
> subdomain `sub.main.com' to an external server `ext.org'
> I want to hide the `ext.org' name from the users and just show say
> `sub.main.com/index.php' instead of `ext.org/index.php' in the browser
> address bar.
> How can I achieve this via mod_rewrite ? Kindly enlighten ...
> Regards,
> Bhaskar
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250
> 
> _______________________________________________
> ilugd mailinglist -- ilugd@lists.linux-delhi.org
> http://frodo.hserus.net/mailman/listinfo/ilugd
> Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
> http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
>

_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to