[OR] flag on [Rewrite/seo] cond
4 posts
• Page 1 of 1
[OR] flag on [Rewrite/seo] cond
Hi! I've noticed that if i write a sequence of SeoCond and RewriteCond like this:
SeoCond %{REQUEST_URI} home [NC,OR]
SeoCond %{REQUEST_URI} Site_map [NC, OR]
SeoCond %{REQUEST_URI} About_us [NC, OR]
SeoCond %{REQUEST_URI} Service [NC, OR]
SeoCond %{REQUEST_URI} Sales_network [NC, OR]
SeoCond %{REQUEST_URI} News_Events [NC, OR]
SeoCond %{REQUEST_URI} Contacts [NC]
Seorule ^(.+)\.asp(.*)$ $1.html$2 [Redirect]
RewriteCond %{REQUEST_URI} home [NC,OR]
RewriteCond %{REQUEST_URI} Site_map [NC, OR]
RewriteCond %{REQUEST_URI} About_us [NC, OR]
RewriteCond %{REQUEST_URI} Service [NC, OR]
RewriteCond %{REQUEST_URI} Sales_network [NC, OR]
RewriteCond %{REQUEST_URI} News_Events [NC, OR]
RewriteCond %{REQUEST_URI} Contacts [NC]
RewriteRule ^(.+)\.html(.*)$ $1.asp$2 [NC,NS]
the URI that aren't present in the seo/rewrite Cond are transformed in the same way, although this is not the behaviour that i needed. There are a way to solve this problem? Thank you very much!
SeoCond %{REQUEST_URI} home [NC,OR]
SeoCond %{REQUEST_URI} Site_map [NC, OR]
SeoCond %{REQUEST_URI} About_us [NC, OR]
SeoCond %{REQUEST_URI} Service [NC, OR]
SeoCond %{REQUEST_URI} Sales_network [NC, OR]
SeoCond %{REQUEST_URI} News_Events [NC, OR]
SeoCond %{REQUEST_URI} Contacts [NC]
Seorule ^(.+)\.asp(.*)$ $1.html$2 [Redirect]
RewriteCond %{REQUEST_URI} home [NC,OR]
RewriteCond %{REQUEST_URI} Site_map [NC, OR]
RewriteCond %{REQUEST_URI} About_us [NC, OR]
RewriteCond %{REQUEST_URI} Service [NC, OR]
RewriteCond %{REQUEST_URI} Sales_network [NC, OR]
RewriteCond %{REQUEST_URI} News_Events [NC, OR]
RewriteCond %{REQUEST_URI} Contacts [NC]
RewriteRule ^(.+)\.html(.*)$ $1.asp$2 [NC,NS]
the URI that aren't present in the seo/rewrite Cond are transformed in the same way, although this is not the behaviour that i needed. There are a way to solve this problem? Thank you very much!
Re: [OR] flag on [Rewrite/seo] cond
Hello,
I suggest you to use the shorter (and I believe better working) structure:
SeoCond %{REQUEST_URI} (?:home|Site_map|About_us|Service|Sales_network|News_Events|Contacts) [NC]
Seorule ^(.+)\.asp(.*)$ $1.html$2 [Redirect]
RewriteCond %{REQUEST_URI} (?:home|Site_map|About_us|Service|Sales_network|News_Events|Contacts) [NC]
RewriteRule ^(.+)\.html(.*)$ $1.asp$2 [NC,NS]
I suggest you to use the shorter (and I believe better working) structure:
SeoCond %{REQUEST_URI} (?:home|Site_map|About_us|Service|Sales_network|News_Events|Contacts) [NC]
Seorule ^(.+)\.asp(.*)$ $1.html$2 [Redirect]
RewriteCond %{REQUEST_URI} (?:home|Site_map|About_us|Service|Sales_network|News_Events|Contacts) [NC]
RewriteRule ^(.+)\.html(.*)$ $1.asp$2 [NC,NS]
Re: [OR] flag on [Rewrite/seo] cond
I've tried to insert the Seo/Rewrite cond like this (I've hard copy it in the .htaccess file) but the page had generate a redirecting loop. Any other suggestion? Meanwhile, I read the documentation in case of my error. Thank you very much!
Re: [OR] flag on [Rewrite/seo] cond
Hello,
I guess the syntax for RewriteRule is incorrect, please try to fix it like this:
RewriteBase /
SeoCond %{REQUEST_URI} (?:home|Site_map|About_us|Service|Sales_network|News_Events|Contacts) [NC]
SeoRule ^(.+)\.asp(.*)$ /$1.html$2 [Redirect]
RewriteCond %{REQUEST_URI} (?:home|Site_map|About_us|Service|Sales_network|News_Events|Contacts) [NC]
RewriteRule ^(.+)\.html$ /$1.asp [NC,NS,QSA]
I guess the syntax for RewriteRule is incorrect, please try to fix it like this:
RewriteBase /
SeoCond %{REQUEST_URI} (?:home|Site_map|About_us|Service|Sales_network|News_Events|Contacts) [NC]
SeoRule ^(.+)\.asp(.*)$ /$1.html$2 [Redirect]
RewriteCond %{REQUEST_URI} (?:home|Site_map|About_us|Service|Sales_network|News_Events|Contacts) [NC]
RewriteRule ^(.+)\.html$ /$1.asp [NC,NS,QSA]
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests