How to 301 redirect static URLs using htaccess

If your website has static URLs i.e. do not contain any query string parameters and you need to redirect your old website URLs to your new website URLs then you don’t have to fear anymore. You can write simple redirect statements in your .htaccess file and you don’t have to be regular expression guru. Add … Read moreHow to 301 redirect static URLs using htaccess

How to 301 redirect non-www URLs to www URLs using htaccess

If your website can be accessed by two different URLs then your website could be penalized for duplicate content by the search engines which would be costly in terms of your rankings. For e.g. if your website can be accessed by http://www.exampleurl.com and http://exampleurl.com then Google may deem it as duplicate content. Google provides a … Read moreHow to 301 redirect non-www URLs to www URLs using htaccess

How to 301 redirect SSL URLs to non-SSL URLs using .htaccess

If you would like to rewrite your SSL URLs to non-SSL URLs then please add the following code to your .htaccess file. RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ http://www.adeelsarfaraz.com/$1 [R=301,L] The above code should be used in the following conditions: 1. Your website used to run on https:// and now it does not use SSL. 2. … Read moreHow to 301 redirect SSL URLs to non-SSL URLs using .htaccess

301 redirect folder url to root url using htaccess

Our SEO department recently tweaked the URLs of a client website in order to improve the search engine rankings. The change was minor and they just removed a category path from the URL which shortened the actual length of the URL. There was one problem. The website was already indexed in Google and even though … Read more301 redirect folder url to root url using htaccess

How to disallow executable scripts from executing using htaccess

I came across an issue recently in which the client complained that his hosting provider had suspended his website account due to large number of spam emails being sent from this website. The client website was a small 5 page website and CAPTCHA had been implemented on the Contact Us form. After talking with client’s … Read moreHow to disallow executable scripts from executing using htaccess