mpi77/PhoenixFramework/master/.htaccess - Htaccess File

mpi77/PhoenixFramework/master/.htaccess

#
#  @version 1.5
#  @author MPI
#

ErrorDocument 400 /phoenix/error/error.php?code=400
ErrorDocument 401 /phoenix/error/error.php?code=401
ErrorDocument 403 /phoenix/error/error.php?code=403
ErrorDocument 404 /phoenix/error/error.php?code=404
ErrorDocument 405 /phoenix/error/error.php?code=405
ErrorDocument 408 /phoenix/error/error.php?code=408
ErrorDocument 500 /phoenix/error/error.php?code=500
ErrorDocument 501 /phoenix/error/error.php?code=501
ErrorDocument 502 /phoenix/error/error.php?code=502
ErrorDocument 503 /phoenix/error/error.php?code=503
ErrorDocument 504 /phoenix/error/error.php?code=504
ErrorDocument 505 /phoenix/error/error.php?code=505

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /

#redirect spam bots
RewriteCond %{HTTP_USER_AGENT} Wget [OR]
RewriteCond %{HTTP_USER_AGENT} CherryPickerSE [OR]
RewriteCond %{HTTP_USER_AGENT} CherryPickerElite [OR]
RewriteCond %{HTTP_USER_AGENT} EmailCollector [OR]
RewriteCond %{HTTP_USER_AGENT} EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ExtractorPro
RewriteRule ^.*$ http://www.spampoison.com/ [L]

#disable view (txt, log) files
<filesmatch ".(txt|log|sql)$">
order allow,deny
deny from all
</filesmatch>

#do not redirect existing file or dir
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]

#redirect error
RewriteCond %{REQUEST_URI} ^/phoenix/([0-9]{3})$
RewriteRule ^([0-9]{3})$ /phoenix/error/error.php?code=$1 [NC,L]

#redirect empty path to app
RewriteCond %{REQUEST_URI} ^/phoenix/$
RewriteRule ^$ /phoenix/index.php [NC,L]

# redirect proxy link /string(with / -)
RewriteCond %{REQUEST_URI} ^/phoenix/([a-zA-Z0-9/-]*[a-zA-Z0-9])$
RewriteRule ^([a-zA-Z0-9/-]*[a-zA-Z0-9])$ /phoenix/index.php?token=$1 [L,QSA]

# redirect app /route/action/
RewriteCond %{REQUEST_URI} ^/phoenix/([a-z]+)/([a-z]+)/$
RewriteRule ^([a-z]+)/([a-z]+)/$ /phoenix/index.php?route=$1&action=$2 [L,QSA]

# redirect app /route/action/integer/
RewriteCond %{REQUEST_URI} ^/phoenix/([a-z]+)/([a-z]+)/([0-9]+)/$
RewriteRule ^([a-z]+)/([a-z]+)/([0-9]+)/$ /phoenix/index.php?route=$1&action=$2&id=$3 [L,QSA]

# redirect app /route/action/string_32chars/
RewriteCond %{REQUEST_URI} ^/phoenix/([a-z]+)/([a-z]+)/([a-zA-Z0-9]{32})/$
RewriteRule ^([a-z]+)/([a-z]+)/([a-zA-Z0-9]{32})/$ /phoenix/index.php?route=$1&action=$2&token=$3 [L,QSA]

# redirect app /route/action/-int_page-int_column-char_direction
RewriteCond %{REQUEST_URI} ^/phoenix/([a-z]+)/([a-z]+)/-([0-9]{1,3})-([0-9]{1,2})-(A|D)$
RewriteRule ^([a-z]+)/([a-z]+)/-([0-9]{1,3})-([0-9]{1,2})-(A|D)$ /phoenix/index.php?route=$1&action=$2&page=$3&column=$4&direction=$5 [L,QSA]

# redirect app /route/action/integer/-int_page-int_column-char_direction
RewriteCond %{REQUEST_URI} ^/phoenix/([a-z]+)/([a-z]+)/([0-9]+)/-([0-9]{1,3})-([0-9]{1,2})-(A|D)$
RewriteRule ^([a-z]+)/([a-z]+)/([0-9]+)/-([0-9]{1,3})-([0-9]{1,2})-(A|D)$ /phoenix/index.php?route=$1&action=$2&id=$3&page=$4&column=$5&direction=$6 [L,QSA]

</IfModule>

<IfModule mod_deflate.c>
SetOutputFilter DEFLATE

<IfModule mod_setenvif.c>
# Netscape 4.x has some problems
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48, the above regex won’t work. You can use the following
# workaround (comment the above line and uncomment the below line) to get the desired effect:
# BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html

# Don’t compress already-compressed files
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:avi|mov|mp3|mp4|rm|flv|swf|mp?g)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .pdf$ no-gzip dont-vary
</IfModule>

<IfModule mod_headers.c>
# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_USER_AGENT, no-gzip, REQUEST_FILENAME, REQUEST_URI

Comments

Apache