...

View Full Version : Shortening .htaccess



ChaseWorx
08-03-2010, 08:32 PM
Here is what I currently have in .htaccess:


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:


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?

abduraooft
08-04-2010, 09:05 AM
(sq|ar|hy|az|eu|be|hu) You are missing the path af and you might be testing with this.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum