Cause of redirect?

What can cause a URL to rewrite?

I have a mod_rewrite that rewrites te URL for my home page from http://local.acme/index.php to http://local.acme/

Because the redirect isn’t working properly, I renamed my .htaccess file to +.htaccess hoping that disables it.

But something is still rewriting the URL for my homepage.

What could cause that?

Could be your browser has cached something (this happens to me a lot in firefox) or something else on your system.

If the rewrite does not happen when you use a different browser/computer/phone/tablet/tv/wifi router or internet service provider then something being cached somewhere was the problem.

I don’t believe this is a cache issue because I have rebooted.

Also, in my “index.php” file, I put this at the top…

echo "index.php";
exit();

When I go to: http://local.acme/index.php I am never getting to the index.php page even with my .htaccess file removed.

So something else is causing a rewrite prior to my .htaccess file…

When I go to: http://local.acme/index.php I am never getting to the index.php page

What are you getting?

What’s in your vhost config?

My browser immediately redirects to:

http://local.acme/Users/user1/Documents/path/to/webroot/which/is/public_html/

I am using MAMP if that is what you are asking.

MAMP = mac apache mysql php

apache can have rewrites defined in either .htaccess or vhost

your problem might be specific to MAMP and you should find a MAMP forum to ask this question in also

Sponsor our Newsletter | Privacy Policy | Terms of Service