Author Archives

More Fun With .htaccess Files

3 things you can do with .htaccess files that we probably haven’t mentioned on this blog before:

1). Put error messages in the .htaccess file as opposed to creating separate web pages. There is no real reason to do this. However, it is pretty cool, in that you can pretty much create a website using just an .htaccess file and no other files.

ErrorDocument 404 "<html><head><title>This Is a Demo</title>
</head><body>Here is some cool stuff:<ul><li>Some text</li>
<li><a href='/'>A Link</a></li></ul></body></html>"

2). Use mod_rewrite to rewrite a URL internally with no redirect. I don’t believe that we have ever covered this, but it is very handy:

RewriteEngine on

RewriteRule ^happyurl\.php$ crazyurl.php?with=some&extra=bits[L]

3). How about using mod_rewrite to redirect any queries to a certain page if the page/directory that is being accessed doesn’t exist.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /oopsydaisy.php [L]

Note, don’t get this confused with with error documents. This .htaccess rule give out a 200 OK in the http headers, which tells search engines that the pages exists, where as the error document will give out the relevant header – 404 or whatever, telling the search engines what the issue with the url they are accessing is.

James
SEO Programmer

Search Engine Optimisation Tips

Little things to watch out for in SEO: If you are using an ErrorDocument in your .htaccess file, for 404s or other error messages, make sure you have it referencing …

Find out more

How many browsers do you use in SEO?

During SEO, if we have to make changes in the code of a site, we obviously have to check to make sure that the changes we have made haven’t changed …

Find out more

Backlinks On Live.com

A while back, Microsoft removed the ability to see the back links of a site from live.com. It now appears that they have added this functionality back, which is a …

Find out more

Bad Internal Linking Can Hinder SEO

Something that we sometimes forget in this age of technology is that while the all singing, all dancing websites are great to look at and functionally can be superb, they …

Find out more

Google webmaster tools updated again

Google have added yet another feature to webmaster tools. I have lost track of how many times Google have added new features to web master tools, but this could turn …

Find out more

Site Links Updated

Last Friday I wrote about Google Site Links. And since then they have changed it to a new version. For example, our own site links used to look like this: …

Find out more

Google sitelinks, what are they?

Have you ever done a search on Google and seen that the top result has several links to pages within the site? These are called sitelinks, and as you can …

Find out more

Another SEO based mod_rewrite rule

I though that as it is a Friday, I would share with you a mod_rewrite rule that I don’t think has been mentioned before on this blog. I like to …

Find out more