php - htaccess redirect incomplete task -
a couple of days ago asked question not answer have not quite, i'm sure it’s i'm missing , guys can me...
here code:
rewriteengine on rewritecond %{http_host} ^monitorbc\.info$ [or] rewritecond %{http_host} ^www\.monitorbc\.info$ rewriterule ^notas\.php?(.*) "https://monitorbc.info/monitor3/notas.php?" [r=301,l] # 1 of links old site = https://monitorbc.info/notas.php?id=699&sec=economia # should end = https://monitorbc.info/monitor3/notas.php?id=699&sec=economia
the problem redirect reason redirect stops @ ? sign it’s not completing task.
hope i’m making sense time.
you can't match against query string in rewrite rule, can match against %{query_string}
variable inside rewrite condition. ?
have in expression gets evaluated last "p" in "php" optional. since don't seem using query string anyways. remove ?
marks. default query string appended target of rule:
rewriteengine on rewritecond %{http_host} ^monitorbc\.info$ [or] rewritecond %{http_host} ^www\.monitorbc\.info$ rewriterule ^notas\.php$ https://monitorbc.info/monitor3/notas.php [r=301,l]