Tuesday, 15 June 2010

apache - Redirect + rewrite infinite loop -


I'm sorry, my english is not very good, but I will try to explain my question. 'Index.php' is my main landing page.

A. Each request should go to index.php. Its easy to do Revisit * Index.php [L] (Simplified). So when I type 'News / 123' in the address bar, index.php handles it and shows me the news. It works fine.

B But I need to enter '/index.php' in the address bar to replace '/ home' and then -> A. I thought it could be done by the redirect / indix.fp / main but it causes an infinite redirection loop.

Can anyone help me with it? You can use these rules in root .htaccess:

directory index index.php rewriteignin rewrite code% {THE_REQUEST} /index.php [nc] revised rule ^ index \ .php $ / home [l, r = 302] # if a valid directory for revivecode% {REQUEST_FILENAME} is not! -D # If there is a request for a valid file revoked code% {REQUEST_FILENAME} -f Rewrite rules Index.php [L]

No comments:

Post a Comment