0 Replies Latest reply on Nov 6, 2015 8:19 AM by xfreeman89x

    .htaccess infinite redirect loop

    xfreeman89x

      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:

      <IfModule mod_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