Archive for the ‘Apache’ Category

.htaccess redirect based on requested domain

Monday, April 28th, 2008
No Gravatar

Imagine you have a selection of domain names that point to the same site, are some of those domains specific to certain areas of your site?

Here’s how I redirect a domain name to a specific area on a site

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?cubecartexperts\.co.uk
Rewriterule ^(.*)$ http://www.i9000networks.com/landing-page/cubecart-experts/ [L]

You’ll also need the domain set in your virtualhost config like this

ServerName www.i9000networks.com
ServerAlias www.cubecartexperts.co.uk
ServerAlias cubecartexperts.co.uk

It is a much more helpful way of helping your users navigate your site.

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Redirecting WordPress index.php to root

Sunday, April 20th, 2008
No Gravatar

If you check the Page Rank of http://bloke.org against http://bloke.org/index.php, which are both, to a human, obviously the same page you’ll see two different results. My domain carries a PR3 whilst the latter carries a PR0.

We know they are both the same, but do the crawlers? No, they don’t. (more…)

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo