wordpress - www. redirect is failing with .htaccess -


i have wordpress site running on ubuntu apache2 server. want server redirect traffic www.mysite.com mysite.com.

i made modification in .htaccess file this:

   <ifmodule mod_rewrite.c>     rewriteengine on     rewritebase /     rewritecond %{http_host} ^www\.(.*)$ [nc]     rewriterule ^(.*)$ http://%1/$1 [r=301,l]      #rewriteengine on     #rewritebase /     #rewriterule ^index\.php$ - [l]     #rewritecond %{request_filename} !-f     #rewritecond %{request_filename} !-d     #rewriterule . /index.php [l]      </ifmodule> 

and modified apache2.conf this:

<directory /var/www/>     options indexes followsymlinks     allowoverride     require granted </directory> 

still no success.i still ubuntu apache server default page www.mysite.com. missing?


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -