Answer the question
In order to leave comments, you need to log in
How to exclude categories from a redirect to a new domain?
hello there is this rule:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteCond %{HTTP_HOST} site.net
RewriteRule ( .*) https://site-net.turbopages.org/site.net/s/$1 [R=302,L]
This is a redirect from domain to domain on mobile pages for turbo.
How to exclude the lechenie-diarei/page/2 category redirect and the lechenie-diarei category itself from the redirect
Tried this but doesn't help
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile |palmos|webos" [NC]
RewriteCond %{HTTP_HOST} site.net
RewriteCond %{REQUEST_URI} !^/lechenie-diarei/page/.*$
RewriteRule (.*) https://site-net.turbopages.org/site.net/s/$1 [R=302,L]
Answer the question
In order to leave comments, you need to log in
How mod_rewrite actually works .
mod_rewrite runs the request over and over until it stops changing.
The [L] flag stops the current iteration of request processing. However, if the request was modified by those RewriteRules that still managed to work out, Apache will start the request processing cycle again from the first RewriteRule.
RewriteCond %{REQUEST_URI} !^/lechenie-diarei
RewriteRule . /index.php
RewriteCond %{THE_REQUEST} !^\S+\s/lechenie-diarei
RewriteCond %{THE_REQUEST} "! /lechenie-diarei"
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{REQUEST_URI} !^/lechenie-diarei
And if without a slash in front?
Yes, and do not claim that you have a redirect cache in your browser, you also need to drop it, but preferably check it in another browser or through services.
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC]
RewriteCond %{HTTP_HOST} site.net
RewriteCond %{REQUEST_URI} !^lechenie-diarei/page/.*$
RewriteRule (.*) https://site-net.turbopages.org/site.net/s/$1 [R=302,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question