SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2009
    Location
    Arizona
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    301 redirect when old url and new url are the same at the beginning?

    Hi,

    I am trying to do a redirect where www.domain.com/directory/Abc_Def will redirect to www.domain.com/directory/Abc_Defghi

    I'm running into an infinite loop because the first parts of the url are exactly the same. I tried RewriteRule ^directory/Abc_Def$ /directory/Abc_Defghi [L,R=301] but it didn't work.

    Is there a way to do this?

    Thanks!
    Last edited by TinyQueen; Jun 12, 2013 at 07:01. Reason: Apparently I can't spell "Thanks"

  2. #2
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,268
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Looks to me like it should work. I can only suspect that something else in your htaccess is causing the problem.
    "First make it work. Then make it better."


Bookmarks

Posting Permissions

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