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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shortening .htaccess

    Here is what I currently have in .htaccess:

    Code:
    RewriteRule ^[^/]+/af/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
    RewriteRule ^[^/]+/sq/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
    RewriteRule ^[^/]+/ar/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
    RewriteRule ^[^/]+/hy/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
    RewriteRule ^[^/]+/az/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
    RewriteRule ^[^/]+/eu/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
    RewriteRule ^[^/]+/be/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
    RewriteRule ^[^/]+/hu/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
    I tried shortening all that so it would just look like this:

    Code:
    RewriteRule ^[^/]+/(sq|ar|hy|az|eu|be|hu)/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
    However, the shortened code doesn't seem to be working for me. What have I done wrong to it?

  • #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
    (sq|ar|hy|az|eu|be|hu)
    You are missing the path af and you might be testing with this.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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