Becavalier/YHSPY.COM/master/.htaccess - Htaccess File

Becavalier/YHSPY.COM/master/.htaccess

ErrorDocument 405 /

<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/css image/gif image/jpeg image/png application/x-javascript
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType application/x-javascript A604800
ExpiresByType text/css A604800
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On

# SSL Secure - WWW.YHSPY.COM
# RewriteCond %{SERVER_PORT} !^443$
# RewriteCond %{HTTP_HOST} ^(www.)?yhspy.com$
# RewriteRule ^(.*)?$ https://%{SERVER_NAME}/$1 [L,R]

# Redirect yhspy.com to www.yhspy.com
RewriteCond %{HTTP_HOST} ^yhspy.com(.*) [NC]
RewriteRule ^(.*)$ https://www.yhspy.com/$1 [L,R=301]

# Redirect for www.yhspy.com
RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^ac/auth(/{0,1}) /admin/page_login.php [L]

RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^ac(/{0,1})$ /admin/page_index.php [L]

RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^index.html$ /index.php [L]

RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^rss(/*)$ /rss/index.php [L]

RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^me(/*)$ /me/index.html [L]

RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^rocket(/*)$ /libs/RocketPush/index.html [L]

RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^me-en(/*)$ /me-en/index.html [L]

RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^db(/*)$ /db/index.php [L]

RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^([a-zA-Z0-9]{1,})(/*)$ /index.php?pd=$1 [L]

RewriteCond %{HTTP_HOST} ^www.yhspy.com$
RewriteRule ^([a-zA-Z0-9]{1,})/([a-zA-Z0-9]{1,})[/]{0,1}$ /index.php?pd=$1&id=$2 [L]

# SSL Secure - M.YHSPY.COM
# RewriteCond %{SERVER_PORT} !^443$
# RewriteCond %{HTTP_HOST} ^(m.)?yhspy.com$
# RewriteRule ^mobile/(.*)?$ https://%{SERVER_NAME}/$1 [L,R]

# Redirect for m.yhspy.com
RewriteCond %{HTTP_HOST} ^m.yhspy.com$
RewriteRule ^mobile/blog/([0-9]{1,}) /page_read.php?id=$1 [L]

</IfModule>

<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf|js|css|pdf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_HOST, SERVER_NAME, SERVER_PORT

Comments

Apache