ericdingle/dalhousie/master/src/.htaccess - Htaccess File

ericdingle/dalhousie/master/src/.htaccess

RewriteEngine On
RewriteBase /

# Force www prefix.
RewriteCond %{HTTP_HOST} !^(www|dev)
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R,L]

# Block direct access to subfolders.
RewriteCond %{THE_REQUEST} ^GET /ericdingle/ [OR]
RewriteCond %{THE_REQUEST} ^GET /scriptsauce/
RewriteRule .* 404 [L]

### ericdingle.com start ###

# Redirect paths to ericdingle folder.
RewriteCond %{HTTP_HOST} ^(www|dev).ericdingle.com$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond $1 ^$
RewriteCond %{REQUEST_URI} !^/ericdingle/
RewriteRule ^(.*)$ ericdingle/$1 [QSA]

# Redirect to index.php.
RewriteCond %{HTTP_HOST} ^(www|dev).ericdingle.com$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond $1 ^$
RewriteRule ^ericdingle/(.*)$ ericdingle/index.php?controller=$1 [QSA,L]

### ericdingle.com end ###

### scriptsauce.com start ###

# Redirect paths to scriptsauce folder.
RewriteCond %{HTTP_HOST} ^(www|dev).scriptsauce.com$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond $1 ^$
RewriteCond %{REQUEST_URI} !^/scriptsauce/
RewriteRule ^(.*)$ scriptsauce/$1

### scriptsauce.com end ###

On Github License

Files

Download PDF of Htaccess file
GET, HTTP_HOST, REQUEST_FILENAME, REQUEST_URI, THE_REQUEST

Comments

Apache