Note that there are some explanatory texts on larger screens.

plurals
  1. POhtaccess for subdomain and url rewrite
    primarykey
    data
    text
    <p>I'm in trouble with this .htaccess</p> <pre><code>RewriteCond %{HTTP_HOST} appname.domain.com RewriteCond %{REQUEST_URI} !appname/ RewriteRule ^(.*)$ /appname/$1 [L] </code></pre> <p>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</p> <pre><code>http://appname.domain.com/somefolder </code></pre> <p>I don't want the url to be rewritten to appname.domain.com/appname/somefolder In the url bar. Any help?</p> <p>Update: In the document root i have</p> <pre><code>RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com$ [NC] RewriteCond %{REQUEST_URI} !^v-domain/ RewriteRule ^(.*)$ /v-domain/$1 [L] </code></pre> <p>In v-domain </p> <pre><code>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] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload