1

I am new to htaccess. so when i want to do a url redirect using htacces, i always get a redirect loop, and don't know how to fix it. I have been searching on the web but coundn't find a solution for me. please help on this

what i want to do is to redirect all the subpages under root(/*) to index.html under root (/index.html)

i need to redirect www.mydomain.com.au/* to www.mydomain.com.au/index.html

here is my code

RewriteEngine On
RewriteBase /

RewriteRule ^(.*)$ http://www.mydomain.com.au/index.html [R=301,L]

please help on how to fix this thanks very much !!

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
Ryan
  • 21
  • 1
  • 2

1 Answers1

2

Try adding ...

RewriteCond %{REQUEST_URI} != http://www.mydomain.com.au/index.html

... before ...

RewriteRule ^(.*)$ http://www.mydomain.com.au/index.html [R=301,L]
Red Cricket
  • 462
  • 2
  • 7
  • 20