Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    301 redirect help required.

    HI everyone,

    This is my first post. I hope I have put this in the right section.

    I have an existing site built on a version of software that supported mod rewrite. I have since purchased newer software which also supports mod rewrite. As the transition is fast approaching I am looking to get my 301 redirect in place. I have been searching for the best way to do this and have yet to find whether I can use the existing mod rewrites as the basis for my redirect. Here is what I currently have.

    Existing site:
    RewriteRule ^listing/([0-9]+)/([0-9a-zA-Z_-]+)\.html… viewlisting.php?view=$1 [NC,QSA]
    which would translate into (for example)
    http://www.mysite.com/listing/84/Fox_Whistle.html

    New Site
    RewriteRule ^([0-9]+)-([^\/]+)/details.html$ details.php?id=$1 [nc,qsa]
    which would translate into (for example)
    http://www.mysite.com/84-fox-whistle/details.html

    What I want to find out is if the following would work:
    Redirect 301 listing/([0-9]+)/([0-9a-zA-Z_-]+)\.html http://www.mysite.com/([0-9]+)-([^\/]+)/details.html

    Hope someone can help and thanks in advance

    Kris

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Code:
    RewriteRule listing/([0-9]+)/([0-9a-zA-Z_-]+)\.html http://www.mysite.com/([0-9]+)-([^\/]+)/details.html [R=301,L]
    ?
    Last edited by abduraooft; 02-07-2011 at 01:22 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have been searching for the best way to do this and have yet to find whether I can use the existing mod rewrites as the basis for my redirect
    ___________________
    account creation


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •