Simple change not working: RewriteRule ^$ http://www.domain.com/

I’m trying to change this:

RewriteRule ^$ http://www.domain.com/home/

… to this:

RewriteRule ^$ http://www.domain.com/

…but it gives me an error saying ‘infinite loop’.

What do I do? I bet this is simple.

I’m totally not an expert on .htaccess (I came here with my own question on what is probably a simple problem), but to me an infinite loop suggests that you might have a .htaccess file in both the root directory and the /home/ directory and something in each one is trying to redirect/rewrite to the other.

js153,

If you want help troubleshooting your code, you actually need to show us your code.

Regards,

DK

I found the answer, and I’m pretty certain you don’t need to see any more code!

Above I posted:


RewriteRule ^$ http://www.domain.com/

…and said it was telling me there was an infinite loop.

It baffled me to start, but I’m sure I’ve figured it out now.

That line of code redirects domain.com to domain.com. No wonder it came up with the error.

Why do you need to see more code?

js153,

If you think there is a problem and want help, then it’s required in order to find your error. Nothing sinister about that at all. Members do that all the time although it’s recommended they use www.example.com instead of their actual domain name (unless it’s critical to the problem at hand).

Regards,

DK