• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Redirect non WWW to WWW

#1
I am trying to make my website direct .domain.com to www.domain.com but nothing seems to work =/
I've tried every possible combination of code in my htaccess file, and NOTHING works.

what can i do? help would be appreciated..
 
#5
this is how my htaccess looks and it doesn't work:

# Mod_security can interfere with uploading of content such as attachments. If you

# cannot attach files, remove the "#" from the lines below.

#<IfModule mod_security.c>

# SecFilterEngine Off

# SecFilterScanPOST Off

#</IfModule>



ErrorDocument 401 default

ErrorDocument 403 default

ErrorDocument 404 default

ErrorDocument 500 default



<IfModule mod_rewrite.c>



RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.kota.co.il

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



# This line may be needed to enable WebDAV editing with PHP as a CGI.

#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]



RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -l [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]

RewriteRule ^.*$ index.php [NC,L]

</IfModule>
 

Slavik

XenForo moderator
Staff member
#6
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
 

Glockie

Well-known member
#11
Silly question or two but;

Have you listed in the admin CP that full domain as a URL with or without the www.

If you have an ssl is it too, with or without www.?

I had the exact same issue and then when checking everything I'd realised that I had omitted the www in some places yet included it in others, purely because of habit.

Worth triple checking all of your settings if your .htaccess Is right.
 
#12
Redirect non WWW to WWW........I am trying to make my website direct .domain.com to www.domain.com but nothing seems to work... help would be appreciated..
Can I ask a silly question please... which is it that you want.. your heading suggests that you want people entering domain.com to arrive at www.domain.com With all the hosting outfits I use that is just what happens.

Your message though talks of wanting .domain.com to work and take you to www.domain.com - that doesn't work on my sites. I can set them up to work with anything.domain.com with no bother though. I don't get the wish to want just plain .domain.com to work... who would enter that.

Ignore me if I'm missing the point.

Steve
 
#13
Silly question or two but;

Have you listed in the admin CP that full domain as a URL with or without the www.

If you have an ssl is it too, with or without www.?

I had the exact same issue and then when checking everything I'd realised that I had omitted the www in some places yet included it in others, purely because of habit.

Worth triple checking all of your settings if your .htaccess Is right.
I have listed the full domain, with WWW.

so nobody can help me? I bought this script and untill now i still have 2 major problems.
My logo appears as "not found picture" and the htaccess redirect is not working..

with vBulletin and IPS it never happened to me..
 

Glockie

Well-known member
#14
Not found picture means there is a directory error or something, as for the rest I am more than convinced it's a server / backed issue or an issue with domain settings etc...

I am by no means staff or anything like that, a customer - like yourself, but I will gladly take a look if you wish and need a hand? More than willing to lend a hand....
Trust needs to be mutual, but it's nothing I've not done before... I daren't think of the amount of data and people's details I have seen over the years'
Failing that, submit a ticket??
 

Brogan

XenForo moderator
Staff member
#15
You claim you have tried every solution posted on this forum over the years and none of them work.
In which case I would suggest contacting your host for support as it could be a server (mis)configuration issue.

Regarding the logo, I have just checked your site and the file does not exist on the server in the location you have specified.