by (420 points)
I know that it is out of scope question for you...
but due to automatic changes done during installation of seo toaster in .htaccess file... i am unable to figure out where to write this block of code...

#Force www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]

Can you help me out ?

1 Answer

by (4.1k points)
Hello anshul.

Default.  .htaccess file.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule !\.(js|ico|jpe?g|gif|png|css|pdf|avi|mov|mp(3|4|e?g)|lng|(r|t)ar|tgz|zip|swf|ttf|eot|svg|woff)$ index.php [NC,L]

Also if you want to forward all request with and without www. to www.
Change your website name in your application.ini as www.examle.com/ and use default .htaccess.

Thank you.
by (420 points)
Done as said... It's working fine...
Many thanks to you Andrey...
...