Forum Moderators: phranque
I'm strugling with a challenge I don't know if there is a solution to.
I have a webhotell with dedicated IP that I want to handle multiple domains with, using .htaccess.
And I want it fully automatic, so that if there is a folder already - it will get the files from that folder.
--
RewriteCond %{HTTP_HOST} (www\.)?([^\.]+\.com)$
RewriteCond /home/www/sub/%2 -d
RewriteCond %{REQUEST_URI} /([^/]+)
RewriteCond /home/www/sub/%2/%1 -d
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule (.*)$ %2/%1/$1 [L]
It seems like %2 is being lost when %1 is created... do anyone have a solution to this kind of challenge?
Regards
Lars
RewriteCond %{HTTP_HOST} (www\.)?([^.]+\.com)
RewriteCond /home/www/sub/%2/$1 -d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ([^/]+)$ /%2/$1 [L]
Jim