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 ^(.*)$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]  
RewriteRule .* - [F]
Who is Participating?
GaryConnect With a Mentor Commented:
You don't really have any security issues with .htaccess - as along as no one can access it and change it.
It cannot be viewed in a browser (by default anyway)
Mainly all you are doing in the .htaccess is rewriting urls/blocking ips etc

So nothing to worry about.
If you want to be paranoid

As you are on shared hosting most security precautions are already taken care of for you.
How are we to know if you missed anything? If it seems to be working then what is the problem?
I agree!
myyisAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.