Forum Moderators: phranque
RewriteRule ^adhdmedicationart\.html$ https://example.com/adhd-medication-articles/ [R=301,L]
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^(example\.com)?$
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
IF (URL-PATH is "adhdmedicationart.html") THEN
Redirect to "https://example.com/adhd-medication-articles/"
ELSE
IF (HTTPS is "off" OR HTTP_HOST is not "example.com") THEN
Redirect to "https://example.com/<SAME URL-PATH AS REQUESTED>"
So do I need this Rewrite rule at all?
Should I just delete it and leave the code like this, which seems to work?
I’m moving a 180 page html non https site over to WordPress...
Talked to my host and they suggested this simple code instead.
RewriteEngine On
Redirect 301 "/addintheworkplacearticles.html" https://example.com/manage-adhd-at-work/
and that worked perfectly fine.
The use of RewriteRule to perform this task may be appropriate if there are other RewriteRule directives in the same scope. This is because, when there are Redirect and RewriteRule directives in the same scope, the RewriteRule directives will run first, regardless of the order of appearance in the configuration file.
This redirect was not followed.Why are you interpreting this as an error? A robot, unlike a human browser, is not required to follow-up on a redirect. (But like human browsers, robots are not able to barge through and pick up the originally requested URL; that's never an option with redirects.) They're simply noting its existence.