Question

how to write one rule what would satisfy all this redirect what I try to achive with the following rules

RewriteRule ^desktop/page/1/ /tag/desktop/page/1/ [R,L]
RewriteRule ^desktop/page/2/ /tag/desktop/page/2/ [R,L]
RewriteRule ^desktop/page/3/ /tag/desktop/page/3/ [R,L]
RewriteRule ^desktop /tag/desktop [R,L]

the last one is never executed

Was it helpful?

Solution

Try:

RewriteRule ^desktop(/.*)?$ /tag/desktop$1 [R,L]

Or if you must limit it to page/number:

RewriteRule ^desktop(/(page/[0-9]+/?)?)?$ /tag/desktop$1 [R,L]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top