.htaccess - Redirect to site if WWW part is missing -


after viewing answer of same question on added line in .htaccess

rewritecond %{http_host} !^www\. [nc]
rewriterule ^(.*)$ http://www.example.com/$1 [r=301,l]

but did not worked these 2 cases

example.com
example.com/
example.com/index.php

in other cases successful redirected www.example.com/...
wrong in .htaccess ?

additional info
kind of unknown reason [to me @ least] can not enable error page php, works fine html only.

if understand correctly dns issue. try adding cname record:

cname yourdomain.com www.yourdomain.com


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -