ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

exp:redirect:url question

November 18, 2007 4:26pm

Subscribe [2]
  • #1 / Nov 18, 2007 4:26pm

    adam11238

    34 posts

    I’m having a tough time finding any documentation for exp:redirect:url - a search in the docs gives no results. Long story short, I’m also having a tough time getting redirects to work through my htaccess file, since when I first set the site up, I had to force query string in the url on my old server. Apparently htaccess redirects won’t work with the ? in there (tested without, and it works fine). I just finished completely rebuilding my site, so all the url’s are different, and there is no more ? in them. I’m resorting to using

    {exp:redirect:url location="newurl"}

    at the top of all my old templates, which is working. But I’m wondering if there are any parameters for that tag, specifically one that would state that it is a 301 redirect.

    Many thanks.

  • #2 / Nov 18, 2007 5:14pm

    Lisa Wess

    20502 posts

    Hi, Adam - that is not an out-of-the-box tag.  Could be a plugin or extension. Check Admin -> Utilities -> Plugin Manager and Extension Manager to see if it is, and we’ll get this moved to the proper forum for you.

  • #3 / Nov 18, 2007 5:26pm

    adam11238

    34 posts

    That explains it! Just checked, and it’s a plugin. It doesn’t have a type parameter, unfortunately. i guess my next question is if anyone has had any success using htaccess redirects with force query string on? Or maybe a rewrite?

  • #4 / Nov 19, 2007 10:51am

    Robin Sowell

    13255 posts

    I know it’s possible- but I don’t know how.  htaccess remains a ‘magic box’ to me.  Let me shift this over to ‘How to’ for some brainstorming.  It’s got to be possible.  Also- if you can layout a little more detail on what you need in the htaccess, it would probably help.  I’m fuzzy on the details.  (And would probably consider hacking the plugin to send a 301 header if I couldn’t get htaccess working.)

  • #5 / Nov 19, 2007 11:06am

    adam11238

    34 posts

    Thanks, Robin. I’d definitely appreciate anyone’s advice. What I’m specifically trying to do is 301 redirect old templates with a ? in them to the new templates. For example:

    Redirect 301 /index.php?/site/bandPage_av/url_title/ <a href="http://theperiodiclabel.com/index.php/bands/index/url_title/">http://theperiodiclabel.com/index.php/bands/index/url_title/</a>

    It works just fine if I redirect without the ? in there, so that seems to be the problem.

  • #6 / Nov 19, 2007 1:29pm

    Robin Sowell

    13255 posts

    Yea- the ? is a special character.  What happens if you just \? it?  Does that help?  (I’m so clueless on htaccess!)

  • #7 / Nov 19, 2007 1:31pm

    adam11238

    34 posts

    well, the line of code above is the extent of my htaccess knowledge… i’ll give escaping it a try.

    *edit - no luck.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases