2

I am trying to fix this issue with my website where a Redirect 301 is applied. Here is my .htaccess:

RewriteEngine on

# Redirect "/" to Landing
RewriteRule ^$ http://greenengineering.com.au/landing/ [R=301,L]

# Additionally, redirect "/index.html" to Landing
RedirectMatch 301 ^/index\.html$ /landing

Can anyone guide me on how to remove this Redirection so that user can access the main domain http://greenengineering.com.au?

TimWolla
  • 28,958
  • 8
  • 59
  • 84
user4942646
  • 29
  • 1
  • 2

2 Answers2

3

Simply remove the lines from your .htaccess. In case it does not work your browser may have cached the 301 redirect, as it is meant to be permanent. Try restarting your browser or use a another browser to check whether it worked.

Community
  • 1
  • 1
TimWolla
  • 28,958
  • 8
  • 59
  • 84
2

While developing it's better to use temporary redirects (302) until you are sure of your rules.

The lines below will permanently redirect

http://greenengineering.com.au/ --> http://greenengineering.com.au/landing/

# Redirect "/" to /landing/
RewriteRule ^$ /landing/ [R=301,L]

The lines below will also permanently redirect

http://greenengineering.com.au/index.html --> http://greenengineering.com.au/landing/

# Redirect "/index.html" to /landing/
RewriteRule ^index\.html /landing/ [L=301,L]

Remove the rules that you no longer wish to use. If you find that the 301 redirect is still happening, then please see How can I make Chrome stop caching redirects? and How long do browsers cache HTTP 301s?

Community
  • 1
  • 1
Drakes
  • 20,841
  • 3
  • 44
  • 84