In this article we’ll explain you about Cross-site scripting and steps to prevent Cross Site Scripting(XSS) attack in your Website.
What is Cross Site Scripting(XSS) Attack?
Cross-site Scripting (XSS) is an injection attack by the client-side. Most attackers target to execute malicious scripts in the browser of the victim by including malicious code in a legitimate web page or web application. The actual attack occurs when the victim visits the web page or web application that executes the malicious code.
How to prevent XSS attacks in your website? [STEP-BY-STEP]
Step::1 Login to cPanel and open File Manager section.
Step::2 Go to public_html
Step::3 Now find .htaccess file and right click over and choose the Edit option
Step::4 Copy the code given below:
Options +FollowSymLinks RewriteEngine On RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR] RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2}) RewriteRule ^(.*)$ index.php [F,L]
Step::5 Paste this code in your .htaccess file and click on Save changes.
For more information on Cross Site Scripting(XSS) Attack, head on over to the website or the forum!
If you’re looking for cheap web hosting. Please Contact to MEGA ACS HOST. Shared web hosting started at ₹ 599/Year.
Mega ACS Host: Website:- https://www.megaacshost.com/
Follow Us social media
Facebook Page– https://www.facebook.com/megaacshost/
Twitter Page– https://www.twitter.com/megaacshost