Home 301 redirect in htaccess not working as expected
Reply: 2

301 redirect in htaccess not working as expected

cag8f
1#
cag8f Published in 2016-09-14 00:35:19Z

I am trying to add a simple 301 redirect to a website's htaccess, but no redirection is occurring, nor am I encountering any errors--can anyone shed some light? The redirect would redirect people visiting an old blog post to a new page:

  • old blog post: https://www.horizonhomes-samui.com/horizon-homes-construction/
  • new page: https://www.horizonhomes-samui.com/construction/

The redirect code I'm using is:

Redirect 301 /horizon-homes-construction/ https://www.horizonhomes-samui.com/construction/

Possibly Relevant Info

  • My site is a Wordpress site.

  • I also tried adding a "RewriteEngine On" line to the top, but that did not resolve the issue.

  • The htaccess file I'm editing is located in my WordPress root directory (along with wp-content, wp-admin, index.php, etc).

  • The instructions I'm following for adding the 301 redirect are from this guide.

Thanks.

nzajt
2#
nzajt Reply to 2016-09-14 00:41:34Z

When you don't have a lot of control over the server, which is the case for a lot of wordpress sites, a plugin is better than trying to update the .htaccess file.

I am sure there are a lot of good plugins that do this. This one has worked for us. https://wordpress.org/plugins/redirection/

cag8f
3#
cag8f Reply to 2016-10-02 11:05:23Z

With the help of my server admin, I ascertained why this 301 redirect was not working. It is because my site is on an Nginx server, so any redirects added to htaccess will not be read by the server. My server admin was able to add the redirects properly.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.352101 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO