mercredi 29 avril 2015

Redirect to a locale based on cookie

Our site uses custom locales. We save the locale a user selects in a cookie. How would I add to my htaccess file to accomplish redirecting to the proper locale based on the cookie? Our locales end up pre-pending /dallas, /fort-worth , /plano to the urls.

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule (.+) index.php?p=$1 [QSA,L]

Aucun commentaire:

Enregistrer un commentaire