0 comments / April 08, 2023

Set header conditionally if certain word present in the url - htaccess

You can set headers conditionally if certain word present in the URL using .htaccess. This can be completed by using the Header directive and the "IF" conditional directive.

0 comments / March 09, 2023

401.shtml unauthorized error after htaccess http to https redirection

Strangely i have experienced 401.shtml unauthorized error after i have enabled http to https redirection through htaccess.

0 comments / July 24, 2016

Serve svg images as svg instead of plain text

User agents such as browsers use media types to determine how the content should be processed. When a svg image is not served with correct MIME type in the content type header, It might not rendered as intended by the author.

2 comments / July 22, 2016

Solved: Disable google weblight for your website

Google weblight is a google service, which shows the compressed view of the webpages listed in the search results when a slow network is detected. It removes websites default styles and js files, So user can view the webpage much quicker. But it can be disabled by setting cache control header to no transform.

1 comments / June 21, 2014

Protect index files from hacking

Hacking is a very broad topic to discuss. Here I'm going to discuss about one kind of attack that is mainly targeted on website's index files

0 comments / February 10, 2014

How to redirect from sub folder to root folder using htaccess

When we restructure website url, sometimes we need to redirect url from sub folder to root folder [ public_html ]. This can be done in two methods using htaccess.