Hi there,
I am new to this, so any advise and suggestions are more than welcome.
Here is my problem: Is there anyway I can simplifying my htaccess since I have mutiple same rewritebase and rewritecond for many rewriterule?
Here is my example:
RewriteBase /document/12-345-m/
RewriteCond %{HTTP_REFERER} !^(.*)/otherDoc\.action(.*)$
RewriteCond %{HTTP_COOKIE} !12-345-m/2003011
RewriteRule ^12-345-m2003011-(eng|chi)\.(.*)$ [
mydomain.com...] [L,R=301]
RewriteBase /document/12-345-m/
RewriteCond %{HTTP_REFERER} !^(.*)/otherDoc\.action(.*)$
RewriteCond %{HTTP_COOKIE} !12-345-m/2003011
RewriteRule ^2003011\/(.*)-(eng|chi)\.(.*)$ [
mydomain.com...] [L,R=301]
RewriteBase /document/12-345-m/
RewriteCond %{HTTP_REFERER} !^(.*)/otherDoc\.action(.*)$
RewriteCond %{HTTP_COOKIE} !12-345-m/2003012
RewriteRule ^12-345-m2003012-(eng|chi)\.(.*)$ [
mydomain.com...] [L,R=301]
RewriteBase /document/12-345-m/
RewriteCond %{HTTP_REFERER} !^(.*)/otherDoc\.action(.*)$
RewriteCond %{HTTP_COOKIE} !12-345-m/2003012
RewriteRule ^2003012\/(.*)-(eng|chi)\.(.*)$ [
mydomain.com...] [L,R=301]
RewriteBase /document/12-345-m/
RewriteCond %{HTTP_REFERER} !^(.*)/otherDoc\.action(.*)$
RewriteCond %{HTTP_COOKIE} !12-345-m/2003013
RewriteRule ^12-345-m2003013-(eng|chi)\.(.*)$ [
mydomain.com...] [L,R=301]
RewriteBase /document/12-345-m/
RewriteCond %{HTTP_REFERER} !^(.*)/otherDoc\.action(.*)$
RewriteCond %{HTTP_COOKIE} !12-345-m/2003013
RewriteRule ^2003013\/(.*)-(eng|chi)\.(.*)$ [
mydomain.com...] [L,R=301]
... ... (There are many to follow with exactly same format but 2003014, 2003015 etc)
This is working right now, but it is getting too long with more doc added. How can I simply this, please?
Thanks a lot,
Popo