What is htaccess? Htaccess Basics – Hypertext Access, commonly shortened to htaccess, is a powerful configuration file which controls the directory it is placed in and all the subdirectories underneath it. Htaccess is a useful feature allowing webmasters to control how many aspects of their website workings. Htacess to Redirect Pages You can use 301 redirect for pages not found; ...
Read More »How to setup a 301 Redirect
How to setup a 301 Redirect A 301 HTTP response status code is a way of telling search engines that a page, pages, directory or entire website has been permanently moved to another place on the web. Htacess Redirect This is very useful if you have changed the structure of your websites url’s or if you have moved domain. You ...
Read More »How to Redirect your 404 error to a Custom Page
How to Redirect your 404 error to a Custom Page – A 404 error message is the standard HTTP standard response code which is returned when the visitor cannot communicate with the server. Visitor gets a standardized undesirable 404 Error Page This is a very common error on the web and it occurs when you are trying to visit a ...
Read More »About Htaccess
About Htaccess – The htaccess file is a powerful tool which can redirect users, ban visitors, password protect directories and much more. Htaccess Coding Yet it remains something which intimidates many webmasters because of how complicated the code is. However, just like any programming language, once you have used it a while it becomes more familiar to you. I hope ...
Read More »Htaccess Supersession
Htaccess Supersession – The most common place to upload an .htaccess file is the root ie. the home page of your website. This is because so many things can be controlled from the top level. However, there are many occasions when you will need to upload an .htaccess file to a sub directory. Htaccess Password Protect For example, if you ...
Read More »How to edit file htaccess
How to edit file htaccess – Before you upload an .htaccess file to your server, make sure there is not already one there. Your host panel or perhaps a script you have uploaded may have already changed the htaccess for some reason so you don’t want to overwrite it as doing so could change something important on your site. Htacess ...
Read More »Htaccess Password Protect a Directory
Htaccess Password Protect a Directory is easy to do, all you have to do is : Add some code to your .htaccess file Create a file called .htpasswd Select a username and generate an encrypted password and then add them to your .htpasswd file Code to add to your Htaccess You need to add the following code to your .htaccessfile. ...
Read More »How to Stop Directory Listing
How to Stop Directory Listing – If you have a lot of files in a directory but no index file, your server will list all the files in that server. This can cause a lot of problems. For example, one of the most common directories which webmasters forget to hide is the images folder. This allows everyone to view all ...
Read More »Change the Default Directory Page
Change the Default Directory Page – When you load a directory on the web, for example www.yoursite.com or www.yoursite.com/articles/, the apache server usually looks for the index.html file. If it can’t find that it will look for index.php or index.cgi. Index.html is usually the page with the highest priority and the one which is loaded first. It is possible to ...
Read More »Deny a user by IP Address
Deny a user by IP Address – There may come a time when you unfortunately need to ban someone from visiting your website completely. This is very easy to do using htaccess and can be useful if there is a spammer or disgruntled member attacking your site (something which unfortunately happens a lot to forum and blog owners). To ban ...
Read More »