Jump to content

Photo
- - - - -

Help please - How I can change http://domain.com to http://www.domain.com

domain change edit socialengine help

  • Please log in to reply
7 replies to this topic

#1 Guenscher

Guenscher

    Level 1

  • Members
  • Level
  • 7 points
  • 13 posts

Posted 14 April 2014 - 05:38 AM

Please who can help me to change my domain.com to www.domain.com in my socialengine site?



#2 sco77ish1

sco77ish1

    Level 3

  • Members
  • Level
  • 175 points
  • 96 posts
    • Gender:Male
    • Location:United Kingdom
    • Software:SE 4.8.x


Users Awards

Posted 14 April 2014 - 09:18 AM

Paste this:

 

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

 

After this:

 

RewriteEngine On

 

In .htaccess



#3 sco77ish1

sco77ish1

    Level 3

  • Members
  • Level
  • 175 points
  • 96 posts
    • Gender:Male
    • Location:United Kingdom
    • Software:SE 4.8.x


Users Awards

Posted 22 April 2014 - 10:51 PM

Another way....

 

Paste this:

 

RewriteCond %{HTTP_HOST} !^www\.

RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

 

After this:

 

RewriteEngine On

 

In .htaccess



#4 stokes

stokes

    Level 1

  • Members
  • Level
  • 8 points
  • 12 posts

Posted 20 August 2014 - 08:08 AM

They are both the correct way to write it.

This is an alternative way to write it for both https://www. & http://www. 301

Note this method will not force www. on any sub.domain.tld you may have.

<IfModule mod_rewrite.c>

    # Disabled  directory listing.
    Options +FollowSymLinks -Indexes
    # Disabled Apache multiviews plays havoc with url rewriting.
    Options -MultiViews

    RewriteEngine on
    # NOTICE: when 404 remove commented lines below
    #AllowOverride All
    #RewriteBase /wherever/its/located

    #Force www. without www. on sub.domain looks fugly
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
    RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

</IfModule>


#5 Developerx

Developerx

    Level 5

  • Banned
  • Level
  • 706 points
  • 356 posts
    • Gender:Not Telling
    • Software:Older SE


Users Awards

Posted 09 September 2014 - 05:22 AM

Please who can help me to change my domain.com to www.domain.com in my socialengine site?

All the above will help but try this :

------------------------------------------

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R,L]

-------------------------------------------

Replace yourdomain.com with your domain



#6 zoldos

zoldos

    Level 7

  • Premium
  • Level
  • 266 points
  • 1,191 posts
    • Gender:Male
    • Location:the US south
    • Software:SE 4.8.x


Users Awards

Posted 16 October 2014 - 06:11 PM

I asked this question myself on another site and got this answer which works perfectly for my SE 3 site:

 

Again in .htaccess:

 

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 

Be glad you still have your mind...and your soul...

#7 MissTSiz

MissTSiz

    Level 1

  • Members
  • Level
  • 8 points
  • 21 posts

Posted 16 January 2015 - 05:42 AM

what if you want it both....

depending on what some people type in!



#8 jorddy

jorddy

    Level 1

  • Banned
  • Level
  • 0 points
  • 1 posts

Posted 30 July 2017 - 01:16 PM

thank you







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


All the resources listed here are just for testing purpose and they shouldn't be used at any commercial environment without a valid license.
Those are for users who wants to try them before buy. Help the developer to build it better by purchasing them from original authors.