.htaccess - Whilst forcing www with htaccess unwanted variables of the rewritten url show -
i made change .htaccess , url stopped rewriting properly. looks this:
<ifmodule mod_rewrite.c> rewritecond %{https} !=on rewritecond %{http_host} !^www\..+$ [nc] rewriterule ^ http://www.%{http_host}%{request_uri} [r=301,l] </ifmodule>
i want make "www" appear, , works, urls like:
http://www.e/example/es/1-bienvenidos?lang=es&id=1
instead of
http://www.e/example/es/1-bienvenidos
this rest of config section:
<ifmodule mod_rewrite.c> options +followsymlinks rewriteengine on rewriterule ^(en|es)/([0-9]+)-(.+)/?$ content.php?lang=$1&id=$2 </ifmodule>
the redirect rules (force www )is after other rules
you need have redirect rules before routing rules. rules route requests through things content.php
file negate point of externally redirecting.
Comments
Post a Comment