The problem started with the use of my own pages to handle product display. I haven't got exprience in creating dynamic pages using Magento CMS and hacking. As this process is not a quick and easy learning curve, I decided to use my pages side by side with Magento. Thus, I redirect requests to '(Magento's) index.php' to my 'index' - a php5 file without an extension, if the request url has no parameters. My permanent home is now 'index'. I have other php files eg 'shop' which layout products for different sections - women, men..
The setup works ok but two things are worrying me:
1- The redirect loops (shown in the error_log) for every request sent are just a resource overhaul
2- The site slowed down. Not all the images load.Tried it only on my PC, so could be wrong
So the problem as far as I know is that I have got the rulesets mixed up creating a loop. How can I correct the indefinite loop created n my .htaccess?
- Code: Select all
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.mysite.com/index/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index.php/
RewriteRule ^(.*)index.php/$ http://www.mysite.com/index/$1 [R=301,L]
############################################
## workaround for HTTP authorization
## in CGI environment
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
############################################
## always send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
############################################
## never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME} -l
############################################
## rewrite everything else to index.php
RewriteRule .* index.php [L]