We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Module: Redirect Helper Lite

Development and Programming

Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Redirecting can be a hairy thing if you don’t know how to do it. Redirect Helper Lite is here to make that part of your life easier now. With a few clicks and strokes of the keyboard you can setup simple URL redirects for your ExpressionEngine site. You can also use Redirect Helper Lite to setup and track campaigns that utilize special URLs on your site.

Key Features

• Easily create redirects for internal URLs • Choose between commonly needed HTTP statuses for SEO purposes • Automatically fill in your destination URL with the built-in generator (see docs) • Setup redirects to external websites • Disable a redirect by setting the status to Closed (without having to delete it)

You can check out some example usage and the documentation on the project homepage on my website. Oh yeah, you can also download it there too

       
metadaptive's avatar
metadaptive
96 posts
16 years ago
metadaptive's avatar metadaptive

Hey Erik,

Nice module. Am giving it a test drive on a site that uses leevi’s htaccess generator + structure and have hit a minor snag though.

I know I’m using other 3rd party addons that are not your responsibility, but I’m betting this isn’t an uncommon use case - ie people implementing structure on existing sites and wanting to 301 the old templategroup/template URIs to the new structure pages. So any advice you can give would be gratefully received….

Using the module causes the site to reinserts index.php into the redirected URL string (which isn’t the end of the world at all as far as I’m concerned) but I see that it also trims any preceding slashes from the redirect URI, I can see why you’re doing that, but on my setup this causes the url to be malformed.

For example in the module settings page I have:

string to match: /my/test/redirect/ destination: /destination/page/

When I hit http://mysite.com/my/test/redirect

I get redirected to http://mysite.com/index.phpdestination/page

which then 404’s. any ideas?

Tom

PS A feature request for the Pro version - being able to upload a CSV or similar of redirects would be great for large sites - and will guarantee you at least one sale from me.

PPS I think the lite/pro structure is a really interesting model for paid add-ons - hope it works out!

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

Very sweet - will definitely use this when/if I need to redirect. Will also favorite on devot-ee as soon as it’s listed there.

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
For example in the module settings page I have: string to match: /my/test/redirect/ destination: /destination/page/ When I hit http://mysite.com/my/test/redirect I get redirected to http://mysite.com/index.phpdestination/page

The links are built based on your weblog’s Path settings. If you have Comment URL configured then it will jump to that one, if that is empty then it will use Weblog URL. I’m guessing that you have index.php in one of those for the weblog in question. Can you verify this for me? If that is the case, I will add a section to my docs about this because it definitely needs some clarification since it’s technically part of the set process for people who don’t typically fill in those values.

Note: If you’re using Structure or Pages that supersedes the path values and it just uses the page_uri

Update: You found a bug! I hadn’t tested enough with index.php being used as the site index. I’ve pushed an update out to my site and now it’s version 1.0.1. Download it and give it a try now (just re-upload the redirect_helper_lite directory replacing all files).

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
Very sweet - will definitely use this when/if I need to redirect. Will also favorite on devot-ee as soon as it’s listed there.

Thanks Sean. I tried adding it to Devot:ee last night but had some complications which hopefully will be sorted out sometime today 😊

       
metadaptive's avatar
metadaptive
96 posts
16 years ago
metadaptive's avatar metadaptive

Hi Erik,

Cheer for such a rapid response!

I just wrote a really detailed reply before I figured out where I might be going wrong, I’m calling the {exp:redirect_helper_lite} tag in my 404 template as on the new site I’ll be deploying the previous templategroup/templatename pages don’t exist.

If you’re building the links based on the weblog path settings I’m guessing that may revert to another value when the call comes from the 404 template?

If not then the reply I was going to post is below

best

Tom

Hi Erik You were right that I had index.php present in my weblog path settings (I forgot to set these as I’m mostly using Structure for this site), but even though I’ve removed every instance of it (thank you dEEploy helper!) I’m unfortunately still getting the malformed URIs. Just to be clear my actual weblog path settings are as follows:
Section URL: http://mysite.com/shows/ Comment page URL: http://mysite.com/shows/detail/
And my redirect setting looks like this:
String to match /my/test/redirect/ Destination: shows/calendar
Where /my/test/redirect points to a nonexistent page and calendar is a multientry template in my shows template group. I’m removing index.php with LG .htaccess generator and the following rule (as suggested here)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
Thanks again for your time mate…
       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Tom

What do you have stored under Admin > System Preferences > General Configuration > “Name of your site’s index page”

This setting/preference is also considered when actually parsing the redirect. Is that set to index.php? (it is by default)

       
metadaptive's avatar
metadaptive
96 posts
16 years ago
metadaptive's avatar metadaptive

Yeah that fixed it - sorry Erik, my bad for not catching that one - pretty dumb of me.

Thanks for your time both creating the mod and supporting it - when you release the pro version I’ll be first in line!

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
Thanks for your time both creating the mod and supporting it

You are quite welcome

when you release the pro version I’ll be first in line!

I’ll see you there! 😊

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
PS A feature request for the Pro version - being able to upload a CSV or similar of redirects would be great for large sites

That feature is actually already built in to the pro version. Thanks for the suggestion! 😊

I think the lite/pro structure is a really interesting model for paid add-ons - hope it works out!

Thanks Tom. It will be interesting to see how it works out.

       
Richard Frank's avatar
Richard Frank
200 posts
16 years ago
Richard Frank's avatar Richard Frank

Does this support MSM?

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
Does this support MSM?

It does not technically support MSM. If you need to create a redirect rule that only applies to one site, though, you can still do that and not ruin anything. If the matching string will only occur on a single site you would be fine.

Redirect Helper Pro will support MSM in a number of ways that will be useful.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
16 years ago
Sue Crocker's avatar Sue Crocker

Erik, what about 2.0PB? Will you have a version for that?

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team
Erik, what about 2.0PB? Will you have a version for that?

Yes, I actually intended to write it this week but my whole family has been very sick. I suspect that the 2.0PB version of Redirect Helper Lite will be available by the end of the year.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
16 years ago
Sue Crocker's avatar Sue Crocker

Thanks, Erik. Hopefully ya’ll will get better soon.

       
1 2 3 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.