Loading


Advertisement:

Author Topic: How to add www prefix  (Read 306 times)

amar

  • Newbie
  • *
  • Posts: 5
How to add www prefix
« on: March 18, 2017, 05:27:37 pm »
Could you please tell me how to add www prefix to my URL in osclass?

marius-ciclistu

  • issues
  • Sr. Member
  • *
  • Posts: 359
Re: How to add www prefix
« Reply #1 on: June 01, 2017, 12:02:22 am »
Hi.
I think you could do this by editing your .htaccess file (on your host).

You can find the code by searching online 'redirect non-www to www'.

For example for www to non-www:
Code: [Select]

RewriteEngine On

# www to non-www links.
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]