Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

.htaccess infinite redirect loop

$
0
0

I would like to redirect my pages in the following ways:

www.example.com/index.php?locale=it -> www.example.com/it

and I would like to access the same page when I type:

www.example.com/it

I wrote an htaccess file but it causes a redirect loop. Here is the file:

<IfModulemod_rewrite.c>

Options +FollowSymLinks

RewriteEngine On

RewriteBase /


#REWRITE RULES #---------------------

RewriteCond %{QUERY_STRING} ^locale=(it|en|fr|de|es)$

RewriteRule ^index\.cfm$ %1? [R=302,L]


RewriteCond %{REQUEST_URI} !^index\.cfm

RewriteRule ^(it|en|fr|de|es)/?$ index.cfm?locale=$1 [L] 

</IfModule>

Could you help me to resolve it? Thanks!!!

PS: server is ColdFusion + Apache 2.4.7


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>