I’m moving from a custom coded site to EE soon. So I will need to have Google redirect some 600 old site links to new EE links. I was going to use .htaccess to do this.
It seems that I can use your module like so to do the same thing:
old site link: mysite.com/widgetbox/blue-widget/
Create new EE template group called widgetbox and on the index template place the exp:redirect_helper_lite tag call. Then setup the redirect in the module settings to say redirect that URL to mysite.com/EE-widgets/blue-widget/ And I tested that and it does redirect. Awesome. But….
Isn’t this a big hit on site performance when you factor in that it has to run for every page visitor that came in from the old google link? It would be something like 13 queries (I think this is what I read an empty template is) just to load that widgetbox template group, + 1 query to the database to match a possible redirect. I wonder how long it takes google to replace the old links with the new links in their index though. If it is only like a week, that would be only a week of possibly tons of database calls.
I’m just thinking performance wise it is probably best to go with adding the redirects manually to my .htaccess file.
I’m moving from a custom coded site to EE soon. So I will need to have Google redirect some 600 old site links to new EE links. I was going to use .htaccess to do this.
If your new URLs are similar to your old ones you would probably benefit more from using a regular expression to match the patten of the old URL and then forward to the new URL. Example: if your old link is mysite.com/widgetbox/blue-widget/ and your new location of that link is mysite.com/EE-widgets/blue-widget/ then you might just want to replace the ‘widgetbox’ portion and not rewrite the entire URL. If you haven’t used mod_rewrite before in .htaccess I can throw some helpful links out for you.
Isn’t this a big hit on site performance when you factor in that it has to run for every page visitor that came in from the old google link? It would be something like 13 queries (I think this is what I read an empty template is) just to load that widgetbox template group, + 1 query to the database to match a possible redirect. I wonder how long it takes google to replace the old links with the new links in their index though. If it is only like a week, that would be only a week of possibly tons of database calls.
Aagin, in your situation I think .htaccess may be the better route which wouldn’t even hit EE’s template parser until after the redirect. Redirect Helper (Lite and Pro) is meant to make SEO redirects easy for someone without access to server-lever rewrites or redirects but it’s primarily for ‘campaign tracking’.
That said, I’m still experimenting with a solution for Redirect Helper Pro that writes to your .htaccess file specific rules you set in the module area to minimize the impact on the server for larger traffic sites.
I’m just thinking performance wise it is probably best to go with adding the redirects manually to my .htaccess file.
Always! A server-level redirect will always be faster than running it through something like PHP. In perspective, on my personal site I currently have 14 redirects setup in Redirect Helper and only 2 of them are for SEO purposes. I will remove them after 4 weeks. The rest are for “tracking” things
Erik,
Thanks for the reply.
A large number of my old links had double dashes – sometimes triple dashes and “&” and Capitalized letters so I’ve really changed the link structure on the new EE links to make them nice and clean. I don’t think it would be easy to use a regular expression to use some kind of pattern match.
If you figure out a cool system for the Pro version to write directly to the .htaccess file, please make it compatible with the LG .htaccess generator, so whenever a new template etc is added and the LG generator is ran it doesn’t wipe out the stuff your Pro version added to the file.
How long does it usually take google to re-index all the new links found through the redirects? I’m worried my traffic is going to take a major hit when I turn on the EE site and turn off the old site.
A large number of my old links had double dashes – sometimes triple dashes and “&” and Capitalized letters so I’ve really changed the link structure on the new EE links to make them nice and clean. I don’t think it would be easy to use a regular expression to use some kind of pattern match.
Oh I see. Sounds like you have a tedious road ahead then
If you figure out a cool system for the Pro version to write directly to the .htaccess file, please make it compatible with the LG .htaccess generator, so whenever a new template etc is added and the LG generator is ran it doesn’t wipe out the stuff your Pro version added to the file.
That’s already being worked on. Thanks for the suggestion though!
How long does it usually take google to re-index all the new links found through the redirects? I’m worried my traffic is going to take a major hit when I turn on the EE site and turn off the old site.
I’m no SEO guru, but based on my experience it depends on you and how much effort you put into letting Google know your pages have moved. 301 Redirects are really a “reactive” approach because they only come into play when your site is crawled. I’d suggest searching the web for answers and solutions to that specific question. Google Webmaster Tools may also provide some resources.
I released 1.1.0 of this module today. I encourage anyone using it to upgrade soon because it will enhance the performance of the module. In previous versions you had to include a template tag ({exp:redirect_helper_lite}) somewhere in your template in order for this to work. That was fine and dandy to get the job done but it wasn’t efficient. The template parser had to be initiated in order for these redirects to occur. It also messed with EE’s native {redirect} tag if both were on the same page.
So, the latest update adds a couple of features and fixes a bug or two with the addition of an extension. You can download it from my site now 😊
No support required for this one as I shall try to find another way…
This module killed my site once I activated it. I tested on a local version first and it worked great (was really impressed with how easy it was), I then put it into my PROD version and installed it. I got the install confirmation fine on the modules page but as soon as I loaded another page in the CP it was blank, I then tried my site and it was also blank (as in nothing, no source code at all so just white screen of death).
I restored the database from backup and the site worked fine again.
After this restore I tried to go into the extensions but got the below:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /nfs/c01/h13/mnt/00000/domains/<mydomain>/html/system/extensions/ext.redirect_helper_lite_ext.php on line 26
I’ve now deleted the module files and everything is back working normally. Like I say I don’t require support, but was just letting you know.
[I’m on version 1.6.8]
Hi Eric, as you suggested on your website http://erikreagan.com/projects/redirect-helper-lite/#comment_2 I post here my situation.
I’m developing a website with Structure 2.0.7 and the redirect doesn’t work. That means that if I create a new redirect and I visit the page, nothing appens.
The website is already on the official server but on a sub folder: www.mywebsite.ch/restyling
In the admin panel the Name of your site’s index page is index.php and the URL to the root directory of your site is http://www.mywebsite.ch/restyling/
The Weblog URL in the weblog path setting is http://www.mywebsite.ch/restyling/index.php (is it ok?)
On the Redirect Helper Lite new redirect page, when I pass the mouse over the second question mark, the suggested String to match is http://mywebsite.ch/restyling/thistext so the index.php is missing.
I’m not using any .htaccess (does your module uses the .htaccess for the redirect?)
Thanks in advance, I hope not beeing too much confusing Alberto
On the Redirect Helper Lite new redirect page, when I pass the mouse over the second question mark, the suggested String to match is http://mywebsite.ch/restyling/thistext so the index.php is missing.
The “String to Match” field is what the redirect looks for as an OLD link (if you are redirecting an old url rather than using this for tracking a campaign of some sort). So unless you had index.php in the old address you wouldn’t need it there. This field is not automatically populated like the Destination string is. What are you trying to redirect?
I’m not using any .htaccess (does your module uses the .htaccess for the redirect?
No, it does not use (or require) htaccess to work.
So, what happens if you try to access the URL of the page that should redirect you? Does it display an error page? Does it display your site’s index page?
Now it works, I hope that my solution will help some other newbie:
I installed the LG .htaccess Generator
When I create a redirect I must remember to write the temporary developing folder /restyling in the String to Match field.
It was so simply…
But I still don’t know what is the problem without using the LG .htaccess Generator.
Thanks for your help, bye!
Erik,
Great Module makes things easier than the other options, Thanks!
One bug but I can get around it.
Your “Auto-generate destination by picking an entry from one of your weblogs” seems to only work on the first weblog listed. If I choose one of my other weblogs the 2nd pop down (Entries) does not change to match the entries for that weblog.
But I can still place the URL to the entry I was wanting the redirect in the destination field.
Thanks
Mike
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.