Change method of rewrite-redirect?

Discussion in 'Apache' started by theblade24, Mar 17, 2006.

  1. #1
    I have been rewriting my urls a certain way and now want to change them to include some keywords in the url.

    Is there a way to redirect one rewrite style to another with a 301?
     
    theblade24, Mar 17, 2006 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Post example of current URLs, and how you want them, and the original URL. I think you'll get the infinite loop.
     
    Nintendo, Mar 18, 2006 IP
  3. theblade24

    theblade24 Active Member

    Messages:
    84
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    73
    #3
    theblade24, Mar 20, 2006 IP
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    I don't think it'll work.

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^cp-app/([^.]+)/sports-memorabilia/([^.]+)$ http://www.xxxxxxxxxxxx.com/sports-memorabilia--$1--$2.html [R=301,L]
    RewriteRule ^sports-memorabilia-(.*)\.html shop/cgi-bin/cp-app.cgi?seo=item--$1 [L]
     
    Nintendo, Mar 20, 2006 IP