DaniLatin/Xenium/master/.htaccess - Htaccess File

DaniLatin/Xenium/master/.htaccess

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# RewriteCond %{HTTP_HOST} ^(www.)?[^.]+.xenium.org.*$
# RewriteRule (.*) en/blog/$1 [L]

# RewriteCond %{HTTP_HOST} ^(.*).xenium.org
# RewriteRule ^(.*)$ %{HTTP_HOST}/en/%1/$1 [L,NC,QSA]

RewriteCond %{HTTP_HOST} ^(.*).xenium.org
RewriteRule ^([a-z]{2})/$ index.php?language=$1&module=Blog [L]

RewriteCond %{HTTP_HOST} ^(.*).xenium.org
RewriteRule ^([a-z]{2})/([a-z-]+)/$ index.php?language=$1&module=Blog&slug=$2 [L]

RewriteCond %{HTTP_HOST} ^(.*).xenium.localhost
RewriteRule ^([a-z]{2})/$ index.php?language=$1&module=Blog [L]

RewriteCond %{HTTP_HOST} ^(.*).xenium.localhost
RewriteRule ^([a-z]{2})/([a-z-]+)/$ index.php?language=$1&module=Blog&slug=$2 [L]

# RewriteCond %{ENV:REDIRECT_SUBDOMAIN} =""
# RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9][-a-z0-9]+).xenium.org(:80)?$ [NC]
# RewriteCond %{HTTP_HOST} !^www.xenium.org
# RewriteRule ^(.*) /en/%1/$1 [E=SUBDOMAIN:%1,L]

RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

RewriteRule ^projects/([a-z0-9-]+)/templates/([a-z0-9-]+)/attributes/stylesheets/cssheader_([0-9-.]+).css$ projects/$1/templates/$2/attributes/stylesheets/header.css.php?v=$3 [L]

RewriteRule ^projects/([a-z0-9-]+)/templates/([a-z0-9-]+)/jsheader_([0-9-.]+).js$ projects/$1/templates/$2/attributes/javascripts/header.js.php?v=$3 [L]
RewriteRule ^projects/([a-z0-9-]+)/templates/([a-z0-9-]+)/jsfooter_([0-9-.]+)_([a-z]+).js$ projects/$1/templates/$2/attributes/javascripts/footer.js.php?v=$3&language=$4 [L]

RewriteRule ^store_email_([A-Za-z0-9-]+).php?$ projects/avantbon/templates/default/status/coming-soon/store_email.php?get_eval=$1 [r=301,L]

RewriteRule ^images/([0-9]+)x([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ admin/system/on.the.fly/image.resize.php?filename=$5&file_year=$3&file_month=$4&resize_x=$1&resize_y=$2 [L]
RewriteRule ^images/([0-9]+)x([0-9]+)_([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ admin/system/on.the.fly/image.resize.php?filename=$6&file_year=$4&file_month=$5&resize_x=$1&resize_y=$2&resize_mode=$3 [L]

RewriteRule ^admin/$ admin/login/ [r=301,L]
# RewriteRule ^admin/index.php$ admin/login/ [r=301,L]
RewriteRule ^admin/login/$ admin/index.php [L]
RewriteRule ^admin/interface/$ admin/admin.php [L]
# RewriteRule ^admin/login/admin/system/admin.login.actions/admin.login.actions.php?$ admin/system/admin.login.actions/admin.login.actions.php [r=301,L,NC,QSA]

RewriteCond  %{REQUEST_FILENAME}    !-f
RewriteCond  %{REQUEST_FILENAME}    !-d

RewriteRule ^admin/interface/(.*)$ admin/admin.php

# Minify rewrites

RewriteRule ^javascripts/(.*)$ admin/system/on.the.fly/minify.js.php?file_path=$1 [L]
RewriteRule ^optcss/(.*)$ admin/system/on.the.fly/minify.css.php?file_path=$1 [L]

RewriteRule ^javascript/([0-9.]+)/header.js$ /projects/avantbon/templates/default/attributes/js/header.js.php?v=$1 [L]

# Conditions

#RewriteCond %{HTTP_HOST} !^localhost [NC]
#RewriteCond %{REQUEST_URI} ^/sl/subscription
#RewriteRule ^(.*)$ http://localhost/$1 [R=301]

#RewriteCond %{HTTP_HOST} !^localhost [NC]
#RewriteCond %{REQUEST_URI} ^/payments
#RewriteRule ^(.*)$ http://localhost/$1 [R=301]

#RewriteCond %{HTTP_HOST} !^localhost [NC]
#RewriteCond %{REQUEST_URI} ^/payment
#RewriteRule ^(.*)$ http://localhost/$1 [R=301]

#RewriteCond %{HTTP_HOST} ^localhost [NC]
#RewriteCond %{REQUEST_URI} !^/sl/subscription
#RewriteCond %{REQUEST_URI} !^/payments
#RewriteCond %{REQUEST_URI} !^/payment
#RewriteRule ^(.*)$ http://other.localhost/$1 [R=301,L]

###########

#RewriteCond %{HTTP_HOST} ^localhost [NC]
#RewriteCond %{REQUEST_URI} ^/sl/subscription
#RewriteRule ^(.*)$ http://other.localhost/$1 [R=301,L]

#RewriteCond %{HTTP_HOST} ^localhost [NC]
#RewriteCond %{REQUEST_URI} ^/payments
#RewriteRule ^(.*)$ http://other.localhost/$1 [R=301,L]

#RewriteCond %{HTTP_HOST} ^localhost [NC]
#RewriteCond %{REQUEST_URI} ^/payment
#RewriteRule ^(.*)$ http://other.localhost/$1 [R=301,L]

#RewriteCond %{HTTP_HOST} ^other.localhost [NC]
#RewriteCond %{REQUEST_URI} !^/sl/subscription
#RewriteCond %{REQUEST_URI} !^/sl/payments
#RewriteCond %{REQUEST_URI} !^/sl/payment
#RewriteCond %{REQUEST_URI} !^/sl/admin
#RewriteRule ^(.*)$ http://localhost/$1 [R=301,L]

#RewriteCond %{HTTP_HOST} ^other.localhost [NC]
#RewriteCond %{REQUEST_URI} !^/sl/subscription
#RewriteRule ^(.*)$ http://localhost/$1 [R=301,L]

#RewriteCond %{HTTP_HOST} ^other.localhost [NC]
#RewriteCond %{REQUEST_URI} !^/sl/payments
#RewriteRule ^(.*)$ http://localhost/$1 [R=301,L]

#RewriteCond %{HTTP_HOST} ^other.localhost [NC]
#RewriteCond %{REQUEST_URI} !^/sl/payment
#RewriteRule ^(.*)$ http://localhost/$1 [R=301,L]

#RewriteCond %{HTTP_HOST} ^other.localhost [NC]
#RewriteCond %{REQUEST_URI} !^/sl/admin
#RewriteRule ^(.*)$ http://localhost/$1 [R=301,L]

#rewriterule ^http://other.localhost(.*)$ http://localhost/$1 [R=301,L]

# Offer rewrites

RewriteRule ^([a-z]+)/([a-z0-9-]+)_([0-9]+)/([a-z0-9-]+)_([0-9]+)/$ index.php?language=$1&module=Offer&sub=subcategory_view&category=$2&category_id=$3&subcategory=$4&subcategory_id=$5 [L]
RewriteRule ^([a-z]+)/([a-z0-9-]+)_([0-9]+)/$ index.php?language=$1&module=Offer&sub=category_view&category=$2&category_id=$3 [L]
RewriteRule ^([a-z]+)/([a-z0-9-]+)_([0-9]+)_([a-z0-9-]+)/$ index.php?language=$1&module=Offer&sub=single_view&offer_id=$3 [L]
RewriteRule ^([a-z]+)/cities/([A-Za-z0-9-%+]+)/$ index.php?language=$1&module=Offer&sub=city_view&city=$2 [L]
RewriteRule ^([a-z]+)/([a-z0-9-]+)/(.*)_(.*)/$ index.php?language=$1&module=Offer&sub=city_view&country=$3&city=$4 [L]
RewriteRule ^([a-z]+)/search/$ index.php?language=$1&module=Offer&sub=search_view [L,NC,QSA]

# Payment rewrites
RewriteRule ^payments/([a-z0-9]+)/([a-z]+)/$ index.php?module=Payment&sub=$1&call=$2 [L,NC,QSA]
RewriteRule ^payment/([a-z0-9]+)/([a-z]+)/$ index.php?module=Payment&sub=$1&call=$2 [L,NC,QSA]

# Offer old rewrites

RewriteRule ^([a-z]{2})/([a-z0-9-]+)/([a-z0-9-]+)_([0-9]+)/([0-9]+)/$ index.php?language=$1&module=Offer&sub=single_view&main_category=$2&category=$3&cat_id=$4&offer_id=$5 [L]
RewriteRule ^([a-z]{2})/([a-z0-9-]+)/([a-z0-9-]+)_([0-9]+)/$ index.php?language=$1&module=Offer&sub=category_view&main_category=$2&category=$3&cat_id=$4 [L]

# Social lohin rewrite
RewriteRule ^social-login/([a-z]+)/([a-z]+)/$ projects/$1/commands/commands.social.php?login_method=$2 [L]

# Invoice rewrite
RewriteRule ^invoice/([a-z]+)/([0-9]+)/$ projects/$1/commands/commands.invoice.php?invoice_id=$2 [L]

# Other rewrites

RewriteRule ^([a-z]{2})/subscription/packages/$ index.php?language=$1&module=Subscription&sub=packages [L]
RewriteRule ^([a-z]{2})/subscription/additional-data/$ index.php?language=$1&module=Subscription&sub=additional-data [L]
RewriteRule ^([a-z]{2})/subscription/payment/$ index.php?language=$1&module=Subscription&sub=payment [L]
RewriteRule ^([a-z]{2})/subscription/summary/$ index.php?language=$1&module=Subscription&sub=summary [L]

RewriteRule ^([a-z]{2})/my_profile/$ index.php?language=$1&module=Users&sub=my_profile [L]

RewriteRule ^print_vouchers/$ projects/avantbon/templates/default/modules/Subscription/voucher/index.php [L]
RewriteRule ^print_vouchers/css/(.*)$ projects/avantbon/templates/default/modules/Subscription/voucher/css/$1 [L]
RewriteRule ^print_vouchers/img/(.*)$ projects/avantbon/templates/default/modules/Subscription/voucher/img/$1 [L]

RewriteRule ^([a-z]{2})/activation_([a-z0-9-]+)/$ index.php?language=$1&module=Users&sub=activation&activation_id=$2 [L]
RewriteRule ^([a-z]{2})/([a-z-]+)/$ index.php?language=$1&module=StaticContent&slug=$2 [L]
RewriteRule ^([a-z]{2})/$ index.php?language=$1&module=FirstPage [L]

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

<ifModule mod_headers.c>
<filesMatch ".(gif|png|jpg|jpeg|ico|pdf|svg|woff|ttf|eot)$">
Header set Cache-Control "max-age=315360000"
</filesMatch>
</ifModule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml
</IfModule>

<FilesMatch ".(ttf|otf|eot|woff)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, ENV, HTTP_HOST, REQUEST_FILENAME, REQUEST_URI

Comments

Apache