adam beecher wrote:
>>RewriteEngine on
>>RewriteCond %{HTTP_HOST} ^www\.[^.]+\.mysite\.com$
>>RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
>>RewriteRule ^www\.([^.]+)\.mysite\.com(.*)
>>>>>http://www.mysite.com/users/sites/$1>>>>my problem is that i want the same effect if people leave out the 'www'
>>i've had no luck with it as i'm a bit useless really :-)
>>>>>>>Try this:
>>RewriteEngine on
>RewriteCond %{HTTP_HOST} ^(www\.)?[^.]+\.mysite\.com$
>RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
>RewriteRule ^www\.([^.]+)\.mysite\.com(.*) http://mysite.com/users/sites/$1>>>So, to redirect the browser to another server when downloading images
would the following work (inside
a virtualhost declaration)?
eg when the browser asks for http://www.guest.cx/images/family.png I
want it to be redirected to
http://images.guest.cx/images/family.png
Would the following work?
Rewrite Engine on
RewriteCond %{REQUEST_URI} ^/images
RewriteRule ^/images/(.*)$ http://images.guest.cx/images/$1 [R=301]
k.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!