Tag: htaccess

Setting up canonical URL as www or non-www

[ No Comments ] Posted on November 28, 2009 under Search Engine Optimization (SEO), Server Configuration

Search engines see URLS with www and without www as different URLs. This can cause duplicate content issue and the link “votes” will be divided between two URLs. Impose your preferred URL format, either it’s with or without www, to avoid these problems and make your website more search engine friendly.

Pointing the domain to a folder within the root directory

[ 2 Comments ] Posted on November 9, 2009 under Server Configuration

Insert a code in the .htaccess file to point the domain to a folder within the root directory instead of the root directory itself.

Preventing your visitors from accessing directories / folders

[ No Comments ] Posted on October 27, 2009 under Server Configuration

Prevent visitors from directly accessing the folders of your web hosting / website either by using HTML file index.htm or by inserting a simple code in the .htaccess file.

Something strange I noticed on 301 redirect and Google search results

[ No Comments ] Posted on October 6, 2009 under Server Configuration

The search results of Google for the same keywords changed in just 30 minutes after I setup a 301 redirect. I didn’t know Google can be this fast.

Redirecting visitors to update page during website maintenance

[ No Comments ] Posted on June 7, 2009 under Server Configuration

Display an “under construction” message to all site visitors except you by using the .htaccess to redirecting all visits coming from any IP address except your own while you are updating your website.

Htaccess 301 redirect and subdomains

[ 2 Comments ] Posted on April 25, 2009 under Server Configuration

Subdomains are treated by search engines as separate websites. Human visitors can also see this if the websites within the subdomains have different topics and overall appearance. Redirection between a subdomain and a domain, as well as between two subdomains are possible. Redirection from a subdomain requires separate .htaccess file located in the folder associated with that subdomain.

Using htaccess 301 redirect in folder or subdirectory

[ 1 Comment ] Posted on April 22, 2009 under Server Configuration

The 301 redirect in .htaccess file is used for redirection of incoming traffic from one domain to another. What if you want to redirect from one folder to another in the same domain? In different domains? From a domain’s root directory to one of its subdirectory and vice versa?

IP ban using htaccess file

[ No Comments ] Posted on April 18, 2009 under Server Configuration

The IP ban is the method of permanently banning a user from accessing a website by encoding his or her IP address in the htaccess file. It is very effective against persistent bots that keep on posting spam messages from the same IP address, but using it has the possibility of banning non-malicious users who happen to use the same computer and internet access.

« Previous Entries