Forum Moderators: phranque

Message Too Old, No Replies

How to use request_uri to create new path name

in .htaccess

         

TravelSite

9:10 am on Jun 23, 2005 (gmt 0)

10+ Year Member



In my .htaccess file I'm trying to change where the server gets images from.

Instead of looking at www.widgets.com/images/ I want the server to look at www.widgets.com/www.widgets.com/images/ (where the second "www.widgets.com" is the name of a directory).

The problem is that I'm trying to do this without specifying the actual domain. I've written the following - but can't get it to work. Can anyone tell me whats wrong with this part of my code?

RewriteCond %{REQUEST_URI} ^.*.(jpg¦jpeg¦gif¦js¦css¦class¦jar¦ipix)$ [NC]
RewriteCond %{REQUEST_URI}!%/{HTTP_HOST}/*
RewriteRule ^(.*)$ /%{HTTP_HOST}/$1

TravelSite

2:54 pm on Jun 23, 2005 (gmt 0)

10+ Year Member



I managed to find a solution to this. Please ignore.