Link to home
Start Free TrialLog in
Avatar of myyis
myyis

asked on

htaccess on shared hosting

Hi everybody,
This is my htaccess file on a shared environment.
It seems working, but I will be happy to hear if I miss anything. Any suggestions?
Thank you.

---------------------
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^mysite\.com$
RewriteRule ^(.*) https://www.mysite.com/$1 [R=301]

RewriteCond %{server_port} !=443
RewriteCond $1 ^index$ [NC]
RewriteRule ^(.+)\.php$ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,N]


IndexIgnore *



Options +FollowSymLinks  
RewriteEngine On  
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]  
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]  
RewriteCond %{QUERY_STRING} (\<|%3C).*iframe.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})  
RewriteRule ^(.*)$ index_error.php [F,L]  
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)  
RewriteRule .* - [F]
Avatar of Gary
Gary
Flag of Ireland image

How are we to know if you missed anything? If it seems to be working then what is the problem?
Avatar of Kwoof
Kwoof

I agree!
Avatar of myyis

ASKER

Then a comment about the security issue will make me happy :)
Or to hear that the code seems secure and efficient is sufficent.
Thank you
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial