I'm in trouble with this .htaccess
RewriteCond %{HTTP_HOST} appname.domain.com
RewriteCond %{REQUEST_URI} !appname/
RewriteRule ^(.*)$ /appname/$1 [L]
In the document root (not really the root document, let's say a v-domain folder) i have this folder called 'appname'. On appname.domain.com everything shows up fine as it should. Now my problem is when I want to do something like this
http://appname.domain.com/somefolder
I don't want the url to be rewritten to appname.domain.com/appname/somefolder In the url bar. Any help?
Update: In the document root i have
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com$ [NC]
RewriteCond %{REQUEST_URI} !^v-domain/
RewriteRule ^(.*)$ /v-domain/$1 [L]
In v-domain
RewriteEngine On
RewriteBase /v-domain/
RewriteCond %{HTTP_HOST} appname.domain.com
RewriteCond %{REQUEST_URI} !appname/
RewriteRule ^(.*)$ /appname/$1 [L]
RewriteCond %{HTTP_HOST} appname.domain.com
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^appname/(.+)$ http://appname.domain.com/$1/ [R=301,L]
###################
RewriteCond %{HTTP_HOST} appname2.domain.com
RewriteCond %{REQUEST_URI} !appname2/
RewriteRule ^(.*)$ /appname2/$1 [L]
RewriteCond %{HTTP_HOST} appname2.domain.com
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^appname2/(.+)$ http://appname2.domain.com/$1/ [R=301,L]