Tag Archives: htaccess

Redirecting www To non-www And Vice Versa

Every domain and sub domain can be accessed with two different url. Say you have a website example.com. Then it can be accessed by using urls example.com and www.example.com. This is true in case of sub domains also. Say if you are having a website as blog.example.com then that website can be accessed by two urls, blog.expmle.com and www.blog.example.com. Even though there are two urls, the content on the both url will be same. According to user point of view, having two different urls for same content will not matter much. But according to SEO point of view, having same content on two different urls is a big problem for your website.

Continue reading Redirecting www To non-www And Vice Versa

AddHandler vs AddType : Apache Directive

Just from last few days while stumbling on the web for Branding a website, I came across something called as ‘Using custom extensions to brand your website’. Topic was quite interesting hence I tried to implement it. In first implementation, I got an error and I found that Apache is not serving file properly. Rather than executing file at the server, Apache send it to browser as it is and which results into download of the file at My PC. Again when I started digging more in this topic, I found something new called as Apache Directives. A directive defines how a file will be treated by Client or Server. The error was related to directives, I got answer to my question, I changed my directives and everything started working fine.

AddHandler and AddTypes are two directives which define how file will be treated by apache. Proper use of them will result into desired output while improper use may break server and can result into security risk also.

Continue reading AddHandler vs AddType : Apache Directive