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.

Redirecting urls?

August 29, 2007 6:19pm

Subscribe [1]
  • #1 / Aug 29, 2007 6:19pm

    insomnie

    56 posts

    I moved my site to ee recently and I have a few stories that are popular and recieve good traffic daily. Is there a way to redirect a user to a proper article page when the one they are looking for is not available ? Can someone explain to me how 404 pages work also?


    example.

    Incoming url

    <a href="http://www.mysite.com/2007/02/05/crazy-billboard/">http://www.mysite.com/2007/02/05/crazy-billboard/</a>

    New URL should be

    <a href="http://www.mysite.com/articles/crazy_billboard/">http://www.mysite.com/articles/crazy_billboard/</a>

    Or can someone help me make it so that articles is then sorted by date like so.

    <a href="http://www.mysite.com/articles/2007/02/05/crazy_billboard/">http://www.mysite.com/articles/2007/02/05/crazy_billboard/</a>
  • #2 / Aug 30, 2007 12:31pm

    Robin Sowell

    13255 posts

    I’m thinking htaccess and a 301 permanent redirect is probably the way to go.  If there are just a few articles, you could do it easily by hand, manually mapping the urls.  Someone better with htaccess and pattern matching could probably come up with a way to redirect everything that meets the /xxxx/xx/title-here to /articles/title_here .  But I’m not the good with regular expressions.

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

ExpressionEngine News!

#eecms, #events, #releases