J!Redirect 301 plugin for Joomla!1.5
Do you need to redirect any one of several domains hosted on a single server to your main domain?
The J!Redirect301 plugin for Joomla 1.5 will allow you to set up a permanent redirection (HTTP 301) so that if you have several sites pointing to a single Joomla site you can forward all requests properly to a single domain name. You can use this plugin as a really simple way of redirecting http://yourdomain.com to http://www.yourdomain.com so that only one version of your website will be indexed by domains.
This plugin will be of particular interest to IIS rather than Apache users. Apache users should be able to use the RewriteEngine in .htaccess to set up appropriate (and more flexible) rules.
There are three commonly used ways to automatically redirect one page to another: JavaScript (using location.href), <meta refresh...> and using a 301. Only 301 is considered to be search engine friendly, the JavaScript and Meta methods can adversely affect your search engine ranking and even get your site banned!
There are only two variables for you to configure in the plugin: the target URL (which must include http:// at the start of the address, just as any link between websites) and the domain list. If someone tries to visit http://www.yourSecondDomain.co.uk/whatever.html, they will be redirected to the target URL.
If enough people express interest I will convert this plugin to allow the preservation of the URI between domains so that users are not redirected to a single address. e.g. http://www.yourSecondDomain.co.uk/whatever.html is redirected to http://www.yourdomain.com/whatever.html where whatever.html will be preserved.
Help
Please read this before you contact me for support. Whilst there is tooltip advice on the settings page I realise that redirect is not necessarily straightforward. This might help...
There are two boxes in the config, the target URL and a list of domains to check.
You should put "http://www.mysite.com" into the target URL - note that this is a full URL (and it could be http://www.mysite.com/youVisitedMyOldWebsiteButIWantYouToSeeThisPage.htm for instance).
In the second box you enter a list of *domains* to check. This should be "myoldsite.com" (note the lack of "http://www"). You could make this a list of many domains, e.g. "myoldsite.com,myothersite.com,www.myothersite.com"
Demo
If you click on this link http://goldfigure.co.uk it will open in a new tab / window but will immediately redirect to www.goldfigure.co.uk.
| 4 Kb | 01/04/09 |
We work hard to provide these extensions for free. It's lovely when someone buys us a cuppa to say thanks. If we feel loved then our extensions will remain non-commercial.
We believe in sharing the love... half of the donations we receive via PayPal are passed on to other developers in the open source community.


