Condition on parameter value
3 posts
• Page 1 of 1
Condition on parameter value
Hi all
A/ Nice board !
B/ My question
RewriteRule /(\w+)/page-general-(\d+)_(\d+).html /404.html [I,L]
This rule should work ONLY if $2 > 0 (zero)
Eg. :
/fr/page-general-0_1234.html => no redirection
/fr/page-general-123_456.html => redirection to 404.html
Thx for help
Samish
A/ Nice board !
B/ My question
RewriteRule /(\w+)/page-general-(\d+)_(\d+).html /404.html [I,L]
This rule should work ONLY if $2 > 0 (zero)
Eg. :
/fr/page-general-0_1234.html => no redirection
/fr/page-general-123_456.html => redirection to 404.html
Thx for help
Samish
Re: Condition on parameter value
A/ Thanks!
B/ Please try this:
RewriteRule /(?!.*-page-general-0_.*)\w+/page-general-\d+_\d+\.html /404.html [RP,L]
B/ Please try this:
RewriteRule /(?!.*-page-general-0_.*)\w+/page-general-\d+_\d+\.html /404.html [RP,L]
Re: Condition on parameter value
Hi Anton
1/ THx seems to work with (no first - in **)
RewriteRule /(?!.*page-general-0_.*)\(w+)/page-general-(\d+)_(\d+)\.html /404.html [RP,L]
1/ THx seems to work with (no first - in **)
RewriteRule /(?!.*page-general-0_.*)\(w+)/page-general-(\d+)_(\d+)\.html /404.html [RP,L]
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests