Lightquick Web Design - High Quality, Low Cost

LightQuick Web Design - Latest News

 The new website for the Henley Amateur Operatic and Dramatic Society henleyoperatic.co.uk has now gone fully live. The new site features an exciting Joomla template which matches the fun character of the society. The site is easy to modify ensuring members can submit/change the content themselves. We have trained key personnel in the Society to modify the content.
You are here:
  • Decrease font size
  • Default font size
  • Increase font size
How to redirect from a canonical to a non-canonical web address PDF Print
Written by Dean Beedell   
Wednesday, 23 November 2011

40340433_vicardick270.pngIf you have a lot of domains all pointing to one central domain then you might not want to have all those domains showing and instead you may want them to resolve to just one domain.

What I mean by this is probably best described by an example, you have:

mycrapshop.com
mycrapshop.co.uk
shopsthatarecrap4you.co.uk

and you want each to point to:

my-shop-is-crap.com

So if I type "mycrapshop.co.uk" URL into Chrome's search bar then you may want it to automatically show my-shop-is-crap.com.  Why would you want this? well, one reason is that in Joomla 1.0 & 1.5 site cacheing can cause problems when you are displaying cached pages for one domain when you are expecting another, both Joomla and the site visitor can become quite confused when a domain name changes from page to page.

You may well be buying similar domains as "real estate" to prevent others from stealing surrounding web estate or to cater for typing errors in domain names, my-shop-is-carp.com would be a good example in this case.

So, in host's your control panel you need to have one primary domain and the other domains are 'parked' on top. Then you find the .htaccess file in your root and you add the following redirect code after:

#
#  mod_rewrite in use

RewriteEngine On

#
# rewrite my-shop-is-crap.com (always ensure that canonical www is diverted to non-canonical form)
#
RewriteCond %{HTTP_HOST} ^www.my-shop-is-crap.com [NC]
RewriteRule ^(.*)$ http://my-shop-is-crap.com/$1 [L,R=301]

#
# rewrite mycrapshop.com
#
RewriteCond %{HTTP_HOST} ^mycrapshop.com [NC]
RewriteRule ^(.*)$ http://my-shop-is-crap.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^www.mycrapshop.com [NC]
RewriteRule ^(.*)$ http://my-shop-is-crap.com/$1 [L,R=301]

#
# rewrite mycrapshop.co.uk
#
RewriteCond %{HTTP_HOST} ^mycrapshop.co.uk [NC]
RewriteRule ^(.*)$ http://my-shop-is-crap.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^mycrapshop.co.uk [NC]
RewriteRule ^(.*)$ http://my-shop-is-crap.com/$1 [L,R=301]

#
# rewrite shopsthatarecrap4you.co.uk
#
RewriteCond %{HTTP_HOST} ^shopsthatarecrap4you.co.uk [NC]
RewriteRule ^(.*)$ http://my-shop-is-crap.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^shopsthatarecrap4you.co.uk [NC]
RewriteRule ^(.*)$ http://my-shop-is-crap.com/$1 [L,R=301]

The above rewrites are directed to a non-canonical form of the target domain, ie. a URL without the "www"
This is deliberate, here is an example as to why you might want this - if you have bought an SSL certificate without the www in the common name then it is essential otherwise you will get an error when visitors visit your shopping cart and try to checkout.




Comments (0)Add comments

Write comment

busy
Last Updated ( Friday, 25 November 2011 )
 
< Prev   Next >

Steampunk Yahoo Widget

How about something special for the weekend sir?

Steampunk Yahoo clock/calendar widget download

Lightquick have a nice little Yahoo widget for you to download. Steampunk Stamp WidgetClick on the image above.

Do you need a stamp with that madam?

Yahoo Widget Downloads

Download the Joomla Multi-Sit... here

Joomla Multi-Sit...

Downloads: 32
Avg. Rating:
StarStarStarStarStar(5)

Download the Steampunk Orrery... here

Steampunk Orrery...

Downloads: 1146
Avg. Rating:
StarStarStarStarStar(2)

Download the Steampunk Weathe... here

Steampunk Weathe...

Downloads: 48169
Avg. Rating:
StarStarStarStarStar(38)

Download the Cyberpunk Yahoo ... here

Cyberpunk Yahoo ...

Downloads: 3296
Avg. Rating:
StarStarStarStarStar(15)

Download the Steampunk CPU / ... here

Steampunk CPU / ...

Downloads: 7894
Avg. Rating:
StarStarStarStarStar(26)

Virtuemart Assistance

If you require assistance regarding VM or Joomla then please contact lightquick here...

Contact me here

Site Total Page Views

mod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_counter
mod_vvisit_counterToday908
mod_vvisit_counterYesterday997
mod_vvisit_counterThis week3815
mod_vvisit_counterThis month15884
mod_vvisit_counterAll Visitors480834

Site Last Modified

Site Last Modified:Thursday 17 May 2012, 12:09

Secure Login Form

Log In / Sign Up

Find us on the FreeIndex directory under Web Designers