Pages: [1]
Author Topic: Add "www" to !SITEROOT!  (Read 1618 times)
vdom
Guest


Email
on: Jun 03, 08, 07:32 AM

Hi,

All is in the title.
I've http://myweb.com and i want htttp://www.myweb.com

How i can do it ?
Thanks,
Logged
vdom
Guest


Email
Reply #1 on: Jun 03, 08, 07:56 AM

I know, i can add this line :

Code:
RewriteCond %{HTTP_HOST} ^myweb.com$

RewriteRule ^(.*) http://www.myweb.com/$1  [QSA,L,R=301]

But its possible with your script dont use .htaccess ?
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #2 on: Jun 03, 08, 11:59 AM

Actually SITEROOT has a different meaning: it allows you to install and use the script in a subfolder on your site... for example if the site is site.com (or www.site.com), the script can be installed in the "games" folder. To make it accessible at site.com/games/ (www.site.com/games/) you just need to set the SITEROOT=/games/.

As for your question, RewriteCond in htaccess - is the only solution, and this works perfectly.
Logged
Pages: [1]
 
Jump to: