mod rewrite - Always WWW modrewrite php -


i want force www in urls. i'm having problems writing. know code trick.

rewritecond %{http_host} ^example.com  rewriterule ^(.*)$ http://www.example.com/$1 

but want put in $_get['page']

rewriterule ^(.*)$ /index.php?page=$1 [l] 

how should put together?

this should job

rewritecond %{http_host} ^example.com  rewriterule ^(.*)$ http://www.example.com/$1 rewritecond %{request_uri} !^/index.php rewriterule .* index.php?page=$0 [l] 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -