0

I'm not 100% sure that this is a Drupal problem, but I think there is any issue with my site not flushing the cache. I am trying to change a redirect. I was having some trouble with URL Redirect in the CMS, so I am using the .htaccess file directly. Previously I had set up

redirect 301 /renew https://OLDREDIRECT.com

I just changed that to

redirect 301 /renew https://NEWREDIRECT.com

However, no matter what I do, the site keeps redirecting to the old link.

I have flushed the cache in Drupal, I've flushed my own browser cache, and I even tried running cron, but it will not use the new redirect info in .htaccess.

Does anyone have any idea what might be going on?

Thank you.

2
  • Are you editing the correct .htaccess only (the one present in the drupal root folder)? Sep 22, 2014 at 17:40
  • Yep, I double checked. I even removed 2 backup .htaccess files that the original developer had in there (“.htaccess 2”, “.htaccessBACKUP”), and it didn’t help. Is it possible that my ExpiresDefault time needs to run out first? I would have though that flushing browser cache, etc., would force the browser to find the new redirect rules.
    – rrr45
    Sep 22, 2014 at 18:50

2 Answers 2

0

.htaccess shouldn't require any cache flushes, restarts of the server, etc. They should just take effect.

If you want to check to make sure that your editing the right file (and your not on a production server) you can always throw and invalid line in your .htaccess file. If it throws back a 500 error, your editing the right file and something is wrong somewhere in it, if it doesn't your're working on the wrong file.

1
  • Weird. Instead of using an invalid line, I added a test redirect, and it is working—with a catch. When I add Redirect 301 /renew3443 DIFFERENT_DOMAIN.com Then that link takes me to DIFFERENT_DOMAIN.com/?q=renew3443 I wasn’t expecting the query to show up in the final URL. Is something wrong with my syntax?
    – rrr45
    Sep 22, 2014 at 18:47
0

Whoops, it turns out the problem was with my URL. I had retained a “++++++” instead of using “%2B%2B%2B%2B%2B%2B”

That fixed it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.