Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If (SITE A DOMAIN or SITE A SUBDOMAIN) {
- Rewrite this specific way -> /index.php/$1
- } else {
- Rewrite this specific way -> /directory/www/index.php/$1
- }
- RewriteEngine on
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond $1 !^(index.php|blog)
- RewriteCond %{HTTP_HOST} ^subdomain.example.com$ [NC,OR]
- RewriteCond %{HTTP_HOST} ^ example.com$
- RewriteRule .? - [S=1]
- RewriteRule ^(.*)$ /directory/www/index.php/$1 [L]
- RewriteRule .? - [S=1]
- RewriteRule ^(.*)$ /index.php/$1 [L]
- # If (SITE A DOMAIN or SITE A SUBDOMAIN)
- RewriteCond %{HTTP_HOST} ^subdomain.example.com$ [NC,OR]
- RewriteCond %{HTTP_HOST} ^example.com$ [NC]
- # make sure we haven't already rewritten this URI
- RewriteCond %{REQUEST_URI} !/directory/www/index.php
- # don't rewrite if the resource already exists
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- # rewrite
- RewriteRule ^(.*)$ /directory/www/index.php/$1 [L]
- # IF !(SITE A DOMAIN or SITE A SUBDOMAIN)
- RewriteCond %{HTTP_HOST} !^subdomain.example.com$ [NC]
- RewriteCond %{HTTP_HOST} !^example.com$ [NC]
- # make sure we haven't already rewritten this URI
- RewriteCond %{REQUEST_URI} !/index.php
- # don't rewrite if the resource already exists
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- # rewrite
- RewriteRule ^(.*)$ /index.php/$1 [L]
- RewriteEngine on
- RewriteCond %{HTTPS} !=on
- #RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- #RewriteCond %{HTTP_HOST} ^example.com [NC]
- RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301,NC]
- #RewriteCond %{HTTPS} off
- # Only redirect to https if the main domain (no subdomain) is matched
- # case-insensitively in HTTP_HOST
- #RewriteCond %{HTTP_HOST} ^example.com$ [NC]
- # added flags...
- #RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- RewriteCond $1 !^(index.php|resources|robots.txt)
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
Add Comment
Please, Sign In to add comment