Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Old 08-02-2010, 10:27 PM Shortening .htaccess
Banned

Posts: 39
Trades: 0
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 ^[^/]+/bg/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/za/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/zh-CN/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/zh-TW/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/hr/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/cs/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/da/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/nl/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/en/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/et/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/tl/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/fi/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/fr/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/gl/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/ka/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/de/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/el/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/ht/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/iw/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/hi/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/hu/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/is/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/id/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/ga/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/it/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/ja/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/ko/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/lv/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/lt/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/mk/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/ms/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/mt/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/no/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/fa/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/pl/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/pt/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/ro/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/ru/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/sr/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/sk/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/sl/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/es/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/sw/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/sv/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/th/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/tr/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/uk/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/vi/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/cy/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/yi/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
RewriteRule ^[^/]+/ur/FOLDER/(.*)/(.*)$ ../$1/$2 [R=301,L]
I tried shortening all that so it would just look like this:

Code:
 RewriteRule ^[^/]+/(de|el|fr|etc|etc)/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?
CyberWizard is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-03-2010, 01:18 PM Re: Shortening .htaccess
Banned

Posts: 39
Trades: 0
Also, If I wanted this to apply to all folders and not just FOLDER, what would I need to edit?
CyberWizard is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Shortening .htaccess
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10055 seconds with 12 queries