File: /home/assibfaf/assignmenttutors.net/.htaccess
# Hide directory listings
Options -Indexes
DirectoryIndex index.php index.html
# No font warnings please
AddType font/ttf .ttf
AddType font/eot .eot
AddType font/otf .otf
AddType font/woff .woff
# Secuirty Control
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|tpl)$">
Order Allow,Deny
Deny from all
</FilesMatch>
# Cache Control
<IfModule mod_headers.c>
<FilesMatch "\.(jpg|jpeg|png|gif|swf|css|js)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
</IfModule>
# Gzip Control
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE image/jpg
AddOutputFilterByType DEFLATE image/png
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/javascript
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{env:HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
RewriteRule . - [E=REWRITEBASE:/]
# Uncomment this if you are getting routing errors:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# updates
RewriteRule ^updates/?$ prox-updates.php [L,QSA]
# order
RewriteRule ^order/?$ prox-order.php?view=order [L,QSA]
RewriteRule ^place-order/?$ prox-order.php?view=order [L,QSA]
RewriteRule ^class-help/?$ prox-classhelp.php?view=classhelp [L,QSA]
RewriteRule ^inquiry/?$ prox-inquiry.php?view=inquiry [L,QSA]
# Dashoard
RewriteRule ^dashboard/?$ prox-dashboard.php?view=orders [L,QSA]
RewriteRule ^dashboard/([^/]+)/?$ prox-dashboard.php?view=$1 [L,QSA]
RewriteRule ^dashboard/([^/]+)/([^/]+)/?$ prox-dashboard.php?view=$1 [L,QSA]
RewriteRule ^dashboard/([^/]+)/([^/]+)/([^/]+)/?$ prox-dashboard.php?view=$1 [L,QSA]
# papers
RewriteRule ^papers/?$ prox-papers.php?do=listPapers [L,QSA]
RewriteRule ^papers/download/([^/]+)/?$ prox-papers.php?do=download&file_id=$1 [L,QSA]
RewriteRule ^papers.xml/?$ prox-papers.php?do=sitemap [L,QSA]
RewriteRule ^paper/([^/]+)/?$ prox-papers.php?slug=$1&do=showPaper [L,QSA]
# Checkout
RewriteRule ^checkout/([^/]+)/([^/]+)/([^/]+)/?$ prox-checkout.php?paymentMethod=$1&paymentNodeType=$2&paymentNodeId=$3 [L,QSA]
# Payment
RewriteRule ^payment/([^/]+)/([^/]+)/?$ prox-payment.php?paymentMethod=$1&status=$2 [L,QSA]
RewriteRule ^payment/([^/]+)/?$ prox-payment.php?paymentMethod=paypal&paymentNodeType=$1 [L,QSA]
RewriteRule ^install/?$ prox-install.php [L,QSA]
</ifModule>
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<ifModule mod_php5.c>
# Fix $HTTP_RAW_POST_DATA deprecated warning
#php_value always_populate_raw_post_data -1
</ifModule>
# enable hiding .php extension
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^/]+)$ $1.php