#<IfModule mod_fcgid.c>
#FcgidMaxRequestLen 1073741824
#FcgidMaxRequestsPerProcess 100
#FcgidProcessLifeTime 7200
#</IfModule>
Options -Indexes
RewriteEngine On
RewriteBase /
# Remove www (redirect non-www)
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# Redirect all insecure requests
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
# tell web browsers not to even try HTTP on this domain for the next year
# uncomment this only after you've confirmed your site is working on HTTPS, since it commits you to providing it over HTTPS
#Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
#Header unset Strict-Transport-Security
RedirectMatch 403 ^/?(.*)\.log$
# Prevent rewriting (-d)irectories, (-f)iles and (-l)inks
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^ - [L]
#RewriteRule ^(.*)$ /index.php?pg=$1 [NC,L]
#RewriteRule ^([^/]*)/?(.*)$ /index.php?pg=$1&opt=$2 [NC,L]
#RewriteRule ^u/(.*) ajaxchat/_files/$1 [NC,L]
#RewriteCond %{THE_REQUEST} \s/+index\.php\?pg=([^\s&]+) [NC]
#RewriteRule ^ %1? [R=302,L]
#RewriteRule ^([\w.-]+)/?$ index.php?pg=$1 [L,QSA]
#RewriteRule ^([\w.-]+)/([\w.-]+)/?$ index.php?pg=$1&opt=$2 [L,QSA]
RedirectMatch 403 ^/?files/(.*)\.php$
RedirectMatch 403 ^/?files/(.*)\.pl$
RedirectMatch 403 ^/?files/(.*)\.rb$
RedirectMatch 403 ^/?files/(.*)\.asp$
RedirectMatch 403 ^/?files/(.*)\.jsp$
#AuthType Basic
#AuthName "restricted area"
#AuthUserFile /home/guest/4cdl-images/upload/.htpasswd
#require valid-user
Top