2 different home pages... S.O.S need to fix quick!


(E) #1

I have 2 versions of my site

I thought I was going insane

But it depends if I add the www. before the domain name

HUH!? How did I do this and howe do I fix and which is right!?

THANKS

I have looked at my files using transmit

I do indeed have two sets

a www folder

and public_html


I deleted the WWW file in transmit

BUT I still have a diffent (old version) of my site on the index page!

I cant even find the folder on the server , but its there somewhere!


(Nigel) #2

Check to see if you have a index.html and a index.php page in the same folder. Delete the one that you don’t want. Usually you want to keep the .php one.

Nigel


(E) #3

Thanks Nigel

No I only have .php

Its so weird the www version has images that will not update to newer versions …yet other updates (ie colors have taken place)
Never happened to me before!


(David) #4

The www folder is often an alias of the public_html folder. Perhaps it is a browser cache issue? Have you tried clearing your cache or looking at the page in another browser? Recent versions of Safari have very aggressive caching.


(Nigel) #5

Do you have a website link? Have you deleted the browser cache?


(E) #6

Yup! Just tried it on FF which I never use. And have tried the others so many times.


(E) #7

Thanks Nigel I sent it in a pm


(Robert Ziebol 🖖🏼) #8

This might be some help:
https://www.google.com/search?client=safari&rls=en&q=redirect+www+to+non+www&ie=UTF-8&oe=UTF-8

It is a google search to redirect www pages to non-www pages. This way if someone types in www, they get redirected to the correct page.


(Eric Vaughn) #9

Add a page (All Plug-Ins/HTML Code) in your project, set the folder as “/” so it goes to the same location as your homepage (index) file. I usually name this page htaccess.html

Add the following code (change YourSite to your actual domain). I say this only because I spent an hour trying to figure out why I couldn’t get something on my htaccess page to work, chatting back and forth with tech support :rofl: only to realize my mistake. I immediately took two days off :wink:

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

Log into your C-Panel and locate the htacess.html page and rename it to .htaccess and you should be all set. Or if you currently have a .htaccess page, add the lines of code.

You may have to change your settings in your C-Panel to view hidden (dot) files if you ever need to replace it.


Fastest way to add a 404 page
(Eric Vaughn) #10

I should also add that you want to create the htaccess page as a blank theme from Joe Workman.


(system) #11

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.