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]
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)
RewriteCond %{QUERY_STRING} (\<|%3C).*iframe.*(\>|%3E)
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0
RewriteRule ^(.*)$ index_error.php [F,L]
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
How are we to know if you missed anything? If it seems to be working then what is the problem?
I agree!
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
Or to hear that the code seems secure and efficient is sufficent.
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.