RewriteEngine on
RewriteBase /x3/check
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !image/
RewriteRule ^(.+)$ image/$1 [L]
# Prevent access to various folders with exceptions
RewriteCond %{REQUEST_FILENAME} !app/parsers/slir [NC]
#RewriteRule ^(app|templates|extensions)/ - [NC,F]
# RewriteBase
# Some hosts require a RewriteBase rule to allow the rewriteEngine to function relative to your domain path. You can normally see if this is the case by going to your /check/ page. If RewriteBase is required, uncomment the line below.
# EXAMPLE 1: if running x3 in domain root, RewriteBase /
# EXAMPLE 2: if running from a root folder named 'x3', RewriteBase /x3
# RewriteBase /
# Customize what Apache returns to the client in case of an error.
ErrorDocument 404 /404.html
# Rewrite any calls to *.html, *.json, *.xml, *.atom, *.rss, *.rdf or *.txt if a folder matching * exists
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !public/
RewriteCond %{DOCUMENT_ROOT}/public/$1.$2 !-f
RewriteRule (.+)\.(html|json|xml|atom|rss|rdf|txt)$ $1/ [L]
# Add a trailing slash to directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.|\?)
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ([^/]+)$ $1/ [L]
# Rewrite any calls to /render to the image parser
RewriteCond %{REQUEST_URI} render/
RewriteRule ^render/. app/parsers/slir/ [L]
# Redirect to main domain if using a subdomain- or separate domain to server static assets.
# RewriteCond %{HTTP_HOST} !^domain.com$ [NC]
# RewriteCond %{REQUEST_FILENAME} !\.(js|css|png|jpg|jpeg|gif|woff|ttf|eot|svg)$ [NC]
# RewriteCond %{REQUEST_URI} !app/parsers/slir/
# RewriteRule (.*) http://domain.com/$1 [R=301,L]
# Rewrite any calls to /* or /app to the index.php file
RewriteCond %{REQUEST_URI} /app/$
RewriteRule ^app/ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ index.php?/$1/ [L,QSA]
# Rewrite any file calls to the public directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !public/
RewriteRule ^(.+)$ public/$1 [L]
# Allow basic authentication
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
ErrorDocument 404 /404.html
# Rewrite any calls to *.html, *.json, *.xml, *.atom, *.rss, *.rdf or *.txt if a folder matching * exists
RequestURI isfile Return
Match ^/public/ Return
Match ^/(.+)\.(html|json|xml|atom|rss|rdf|txt)$ Rewrite /$1/
# Add a trailing slash to directories
RequestURI exists Return
Match (\.|\?) Return
Match (.*)/$ Return
Match ^/([^/]+)$ Rewrite /$1/
# Rewrite any calls to /render to the image parser
Match ^/render/. Rewrite /app/parsers/slir/
# Rewrite any calls to /* or /app to the index.php file
Match ^/app/ Rewrite /index.php
RequestURI exists Return
Match ^/(.*)/$ /index.php?/$1/ [QSA]
# Rewrite any file calls to the public directory
Match ^/public/ Return
Match ^/(.+)$ Rewrite /public/$1
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Match ^/(.*)/\?(.*)$ /index.php?/$1/&$2
Match ^/(.*)/$ Rewrite /index.php?/$1/
UrlToolkit {
ToolkitID = imagevue
# Rewrite any calls to *.html, *.json, *.xml, *.atom, *.rss, *.rdf or *.txt if a folder matching * exists
RequestURI isfile Return
Match ^/public/ Return
Match ^/(.+)\.(html|json|xml|atom|rss|rdf|txt)$ Rewrite /$1/
# Add a trailing slash to directories
RequestURI exists Return
Match (\.|\?) Return
Match (.*)/$ Return
Match ^/([^/]+)$ Rewrite /$1/
# Rewrite any calls to /render to the image parser
Match ^/render/. Rewrite /app/parsers/slir/
# Rewrite any calls to /* or /app to the index.php file
RequestURI exists Return
Match ^/app/ Rewrite /index.php
# Match ^/(.*)/\?(.*)$ /index.php?/$1/&$2
Match ^/(.*)/$ Rewrite /index.php?/$1/
# Rewrite any file calls to the public directory
Match ^/public/ Return
Match ^/(.+)$ Rewrite /public/$1
}
Match ^/(.*)/\?(.*)$ Rewrite /index.php?/$1/&$2