|
| Latest
Web News |
Climate change: Australian IT's starting point After spending years researching technology's role in climate change, a Sydney man has created a wiki to share ideas, tips and techniques on going green. David Hart, IT director at services firm Atlantis Blue, said the...
Telco's speed broadband plan Private sector telecommunications companies will be prepared to roll out high-speed broadband internet to capital cities within three years and without a wasteful handout of billions of dollars of taxpayers' funds taken from the Future Fund. Telstra was the most likely...
Australia holds its own in world IT rankings European countries and Singapore have surpassed the United States in their ability to exploit information and communication technology, according to a new survey. The United States, which topped the World Economic...
auDA may open up .au Australia's domain name regulator is considering opening up the nation's top level .au domain, in a dramatic proposal that could see second-level domains such as "example.au" made available. The regulator -- .au Domain Administration (auDA) -- is also...
Coates the new Oracle of grid computing Virtualisation isn't the only technology reorganising the workings of Australia's data centres. Grid computing allows organisations to link multiple physical servers to run a single application. This model has been embraced...
Australia to stay a global centre Australia has become the fastest growing market in the world for India's Satyam Computer Services. "Our revenues have grown enormously, at 50 to 60 per cent a year, since we set up office in Australia in 2000," Satyam director and senior vice-president Virender Aggarwal...
|
|
04.03.07
The Ultimate Wordpress Htaccess File
By
Andy Beard
Canonicalization is a serious problem for webmasters, just read this latest entry by Matt Cutts or this great post from John Andrews.
However telling webmasters that they should fix these issues isn't enough, webmasters & bloggers need solutions.
In Search of the Ultimate Htaccess file
A couple of months ago Alister Cameron posted a simple solution to .htaccess such that you didn't need to use a plugin to convert URLs using www to URLs without.
At the time I suggested a couple of improvements, and also mentioned I would post about it here on my blog, hopefully to help develop what could be looked on as the "Ultimate" .htaccess file for Wordpress, something you could just drop in your root folder and be done with it.
For me the inclination was for multiple niche websites using Wordpress as a CMS, so I really wanted to avoid anything that would make the content look dated.
I am not an htaccess guru, and this is all cobbled together from code suggested by other people in various places. Before using any of this code, make a backup of your existing .htaccess, and be prepared to copy it back if testing proves something is broken.
Lets start off with the default .htaccess for Wordpress once you turn on mod_rewrite for SEO friendly URLs:
Try a Better Way Today. Try WebEx MeetMeNow - Click
Here |
|
The first thing we want to do is get rid of the WWW if someone uses it. I know there are 2 schools of thought on whether URLs should have www by default or not, I prefer without and never type www unless I can't access another site without it (broken htaccess).
Secondly we also want to get rid of trailing slashes.
The base rules that Alister first suggested were:
However we want this to be the Ultimate htaccess code, thus we don't want to have to enter the domain name. I am not sure whether this will work if you have multiple blogs in sub-folders.
In this code we are using HTTP_HOST rather than adding a URL manually to every .htaccess file you create. If you are setting up 50 blogs (niche marketers do things like this, and fill them with unique original content - not everyone creates splogs) then being able to use one default file is a major advantage.
Can we improve on the trailing slashes code?
Possibly…
A while ago I was also reading a post over on Aaron Walls SEO Book blog. Within the comments were suggestions with improvements to the code Aaron suggested.
Finding the exact reference is a problem as it wasn't on this thread.
Continue reading this article.
|