Hi Alice Yes, my mistake. In fact, I have misquoted the issue on reflection. There is only one servername we want shown to the user so in fact the issue is more: User requests www.xyz.com.au which we want to point to www.xyz.com.au/test/page1, hence why the loop is created of course. Therefore the issue is more how we strip the /test from the shown URL. Thanks Alice Moyon wrote: > > Hi, > > The RewriteCond suggested by Adrian may avoid the loop, no ? > Eg as the request is from URL www.abc.com, the RewriteRule will not be > applied because RewriteCond is not true. > > Alice > > Le 16 avr. 07, à 07:08, DBAS a écrit : > >> >> Hi Adrian >> >> Thankyou for your response. Unfortunately both domains are Virtual >> hosts on >> the one machine so of course we have http://www.abc.com.au/test/ with >> lots >> of tests being added as it loops through - this is the problem, how to >> avoid >> the loop! >> >> Thanks >> >> >> >> >> Adrian Dixon wrote: >>> >>> Perhaps this is what you want. I assume you are not serving the abc >>> and >>> xyz domains from virtual servers on one machine. I have allowed you >>> might have more than one domain hosted on the xyz server. If not, you >>> can support very old browsers better by omitting the hostname >>> conditioning. >>> >>> RewriteEngine On >>> RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^www.xyz.com.au/(.*) >>> RewriteRule .* http://www.abc.com.au/test/%1 [R=permanent,L] >>> >>> If you want the operation to be unnoticeable to your users, you will >>> need to reverse proxy www.xyz.au.com through to www.abc.au.com, but be >>> aware there are complications with cookie domains and paths, and more >>> with https. It would work something like this, using mod_proxy and >>> mod_rewrite in Apache 2.2.4 Any absolute links in your developed pages >>> will need rewriting by the reverse proxy server. >>> >>> RewriteEngine On >>> RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^www.xyz.com.au/(.*) >>> RewriteRule .* http://www.abc.com.au/test/%1 [P] >>> >>> Adrian >>> >>> DBAS wrote: >>> >>>> We want to use URL www.xyz.com.au to access internet pages developed >>>> under >>>> server www.abc.com.au/test eg www.abc.com.au/test/page1, >>>> www.abc.com.au/test/page2 and www.abc.com.au/test/graphics/banner.jpg >> etc... >>>> as www.xyz.com.au/page1, www.xyz.com.au/page2 and >>>> www.xyz.com.au/graphics/banner.jpg. >>>> >>>> The only way we have been able to do this to date is using the >>>> following >>>> rewrite rules >>>> <VirtualHost *:7779> >>>> ServerName xyz.com.au >>>> Port 80 >>>> RewriteEngine On >>>> RewriteOptions inherit >>>> # Project Pages >>>> Redirect /index.html http://xyz.com.au/page1 >>>> RewriteRule ^/page1*$ /test/page1 [PT,L,NC] >>>> RewriteRule ^/page2*$ /test/page2 [PT,L,NC] >>>> # Project Folders >>>> RewriteRule ^/graphics/(.*)$ /test/graphics/$1 [PT,L,NC] >>>> LogLevel warn >>>> </VirtualHost> >>>> >>>> Can anyone suggest an easier way to do this please? >>>> >>>> Assistance is much appreciated. >>>> >>>> Thanks >>>> >>>> >>> >>> >>> --------------------------------------------------------------------- >>> The official User-To-User support forum of the Apache HTTP Server >>> Project. >>> See <URL:http://httpd.apache.org/userslist.html> for more info. >>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx >>> " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx >>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Apache-Rewrite-Rule-for-root-directory- >> tf3570101.html#a10010275 >> Sent from the Apache HTTP Server - Users mailing list archive at >> Nabble.com. >> >> >> --------------------------------------------------------------------- >> The official User-To-User support forum of the Apache HTTP Server >> Project. >> See <URL:http://httpd.apache.org/userslist.html> for more info. >> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx >> " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx >> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >> >> > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > > -- View this message in context: http://www.nabble.com/Apache-Rewrite-Rule-for-root-directory-tf3570101.html#a10027011 Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx