htaccess redirect

Discussion in 'Apache' started by puffyz, Jun 30, 2008.

  1. #1
    I am having a little difficulty figuring a problem out. Trying to redirect pagination pages to the main for 1... ie /cat/name/page-1 to /cat/name

    in htaccess have tried

    RewriteRule ^([^/]+)/([^/]+)/page-1$ /$1/$2 [L]

    but this seems to make everything a 500 int error.

    What am I doing wrong? thanks in advance everyone.
     
    puffyz, Jun 30, 2008 IP
  2. puffyz

    puffyz Guest

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    bump, thanks guys let me know if need more info..
     
    puffyz, Jul 1, 2008 IP
  3. puffyz

    puffyz Guest

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    bump this is a tricky one! thnx
     
    puffyz, Jul 2, 2008 IP
  4. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #4
    rule works fine when I test it on my site... so it must be something else in your .htacess file that is messing it up. What's the rest of your .htaccess? You have that needed part in front of that url right?

    
    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^([^/]+)/([^/]+)/page-1$ /$1/$2 [L]
    
    Code (markup):
     
    pr0t0n, Jul 5, 2008 IP