htaccess.madewithlove.com icon indicating copy to clipboard operation
htaccess.madewithlove.com copied to clipboard

PT flag does not seem to work for RewriteRule entries

Open TyIsI opened this issue 8 years ago • 1 comments

The following example does not follow through to the second rewrite rule

RewriteEngine On
RewriteBase /

# Drupal node to wordpress url mapping
RewriteCond %{QUERY_STRING} ^q=content\/(.*)$
RewriteRule . /drupal/%1? [PT]

RewriteRule drupal/example-article /2016/09/12/example-article/ [R=permanent,L]

I can confirm that this does work in a live environment.

Cheers, Ty

TyIsI avatar Sep 12 '16 07:09 TyIsI

I guess you are right, RewriteRule always showing as "not met" while it actually works. (Not just for PT flags)

My example:

RewriteCond %{QUERY_STRING} .redirectURL. [NC] RewriteCond %{QUERY_STRING} !.redirectURL=(/|%2f). [NC] RewriteRule ^/logoff.html(.*) - [F]

shibinca avatar Oct 06 '16 17:10 shibinca