dimanche 25 janvier 2015

need correct .htaccess configuration

I've got the following lines that works perfectly in my .htaccess file.



ErrorDocument 413 error.php?413
ErrorDocument 414 error.php?414
ErrorDocument 500 error.php?500
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php !-f
RewriteRule ^store/([^/\.]+)/?$ storage.php?taid=$1 [L]
RewriteRule ^cart/([^/\.]+)/?$ cart.php?tbid=$1 [L]
</IfModule>


Now, I have already built links that point for e.g this url http://ift.tt/1wza7NM & I want this link to open store.php file. For that I made the new code, which is this



ErrorDocument 413 error.php?413
ErrorDocument 414 error.php?414
ErrorDocument 500 error.php?500
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php !-f
RewriteRule ^(.*)$ $1.php
RewriteRule ^store/([^/\.]+)/?$ storage.php?taid=$1 [L]
RewriteRule ^cart/([^/\.]+)/?$ cart.php?tbid=$1 [L]
</IfModule>


But the problem is I'm getting a redirect loop problem. I know "store" is being used for 2 different purposes here. one for just showing as in url & one as to point to store.php file. I want url's example.com/store/ & example.com/store/ to open store.php & http://ift.tt/1C2l2TA to storage.php (which works fine).





Aucun commentaire:

Enregistrer un commentaire