Website adds www. prefix
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 20
- Joined: Tue May 15, 2018 7:01 am
Website adds www. prefix
Hello,
I have copied the live joomla website to my localhost, and when I go to the site a www. prefix is automatically added. So if I type htpp://website/ it changes to www.website/ and the site isn't working. It's something in the database because it happened only after I imported the db.
I have copied the live joomla website to my localhost, and when I go to the site a www. prefix is automatically added. So if I type htpp://website/ it changes to www.website/ and the site isn't working. It's something in the database because it happened only after I imported the db.
Last edited by toivo on Thu May 17, 2018 10:23 am, edited 1 time in total.
Reason: mod note: moved from 3.x
Reason: mod note: moved from 3.x
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Website adds www. prefix
It's unlikely to be in the database. The information is either defined as part of the management of the domain within the webhosting package that you've purchased or it's defined within the .htaccess file defined within the files system used by your website. I could be wrong but I don't think it's just something that happened after importing the database; I suspect you "imported" one or more files as well.
-
- Joomla! Apprentice
- Posts: 20
- Joined: Tue May 15, 2018 7:01 am
Re: Website adds www. prefix
Hmm well I truly have no clue what could be wrong, I even tried changing some settings in .htaccess but none seemed to have helped. I am actually just an intern right now at the company so I don't know about webhosting package, would it maybe help if I paste the .htaccess file so you could check or ?
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Website adds www. prefix
I, personally, don't want to see the contents of your .htaccess file here on the forum! The .htaccess file may contain sensitive information that relates to your site which, in the wrong hands, could be injurious to you. I don't know what's odd about your .htaccess file but, if you are a novice then I suggest that you shouldn't attempt to make changes to the .htaccess file on your own.
Have you asked the people who manage the webhosting company where your site is located, why you can't enter the domain name without "www."?
Paste the .htaccess file here, if you want to. Whether I can help you is a different question, however.
Have you asked the people who manage the webhosting company where your site is located, why you can't enter the domain name without "www."?
Paste the .htaccess file here, if you want to. Whether I can help you is a different question, however.
-
- Joomla! Apprentice
- Posts: 20
- Joined: Tue May 15, 2018 7:01 am
Re: Website adds www. prefix
I reverted the changes I made to the .htaccess when I saw it didn't work. It's on my localhost so it isn't that much of a problem live site stays the same.
I'm sorry if I worded myself incorrectly, i'm actually having this problem on the copied joomla website, transfered the files with FTP and exported/imported database, basically followed the tutorial: https://docs.joomla.org/Copying_a_Joomla_website
Live site works fine, but localhost/copy site forces www. infront. I haven't talked to the people who manage, only talked to my mentor and he said it must be some settings within the files.
When I go to the administrator/backend site, the url stays normal mysite/administrator with no www. in front
I'm sorry if I worded myself incorrectly, i'm actually having this problem on the copied joomla website, transfered the files with FTP and exported/imported database, basically followed the tutorial: https://docs.joomla.org/Copying_a_Joomla_website
Live site works fine, but localhost/copy site forces www. infront. I haven't talked to the people who manage, only talked to my mentor and he said it must be some settings within the files.
When I go to the administrator/backend site, the url stays normal mysite/administrator with no www. in front
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Website adds www. prefix
When you write "localhost" do you mean your own computer/PC/device that you're using to type these messages on the forum?zaaanck wrote:I reverted the changes I made to the .htaccess when I saw it didn't work. It's on my localhost so it isn't that much of a problem live site stays the same.
When you write "it is on my localhost", is "it" the .htaccess file that you've been changing or is "it" the Joomla website that you have a problem with?
Hmm ... please read my thoughts on To 'localhost' or not to 'localhost', that is the question ...zaaanck wrote:Live site works fine, but localhost/copy site forces www. infront.
- AMurray
- Joomla! Exemplar
- Posts: 9731
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: Website adds www. prefix
You shouldn't get any "www" on localhost since it's not on the World Wide Web?
If you are truly on "localhost" then the URL should be something like http://localhost/ or http://localhost/your-site-folder/ (no www prefix).
If you are truly on "localhost" then the URL should be something like http://localhost/ or http://localhost/your-site-folder/ (no www prefix).
Regards - A Murray
General Support Moderator
General Support Moderator
-
- Joomla! Apprentice
- Posts: 20
- Joined: Tue May 15, 2018 7:01 am
Re: Website adds www. prefix
Yes, I have wamp set up on this computersozzled wrote:When you write "localhost" do you mean your own computer/PC/device that you're using to type these messages on the forum?
Well both actually, but I was referring to the websitesozzled wrote: When you write "it is on my localhost", is "it" the .htaccess file that you've been changing or is "it" the Joomla website that you have a problem with?
I read it, and saw a sentence very familiar with my problem: "my internet site works but my localhost copy doesn't". But I really don't know what else to do than use wamp and try the website on my localhost, I am fairly new to this whole thing never managed websites beforesozzled wrote:Hmm ... please read my thoughts on To 'localhost' or not to 'localhost', that is the question ...
-
- Joomla! Apprentice
- Posts: 20
- Joined: Tue May 15, 2018 7:01 am
Re: Website adds www. prefix
Yes, that is exactly my problem. I am on the localhost I have wamp server and I can see the project site in my localhost projects, that is why I am so confused about this. I am guessing it's most likely some settings within the files when I copied the live website, but I have no idea what could it beAMurray wrote:You shouldn't get any "www" on localhost since it's not on the World Wide Web?
If you are truly on "localhost" then the URL should be something like http://localhost/ or http://localhost/your-site-folder/ (no www prefix).
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Website adds www. prefix
I know how to set up a xAMPx service (but the last time I needed to use one was seven or eight years ago, at least); it—resolving WAMP problems—is just not worth my time. For the very reasons that compelled me to write my thoughts about the problems associated with using WAMP/LAMP/XAMPP/xAMP stack, go knock yourself out: every xAMPx stack is different. I can't help you, sorry. Perhaps someone else who is more "in tune" with localhost-based websites might have an idea.
Without knowing the cause (and, as @AMurray concludes, how can a localhost-based website enforce "www." prefix?) you might try renaming the .htaccess file to something like htaccess.old and see what happens next.
PS: please avoid using the pronoun "it": it introduces uncertainty about what you're trying to describe.
Without knowing the cause (and, as @AMurray concludes, how can a localhost-based website enforce "www." prefix?) you might try renaming the .htaccess file to something like htaccess.old and see what happens next.
PS: please avoid using the pronoun "it": it introduces uncertainty about what you're trying to describe.
-
- Joomla! Apprentice
- Posts: 20
- Joined: Tue May 15, 2018 7:01 am
Re: Website adds www. prefix
Ah okay, so then this is a wamp issue and has probably nothing to do with joomla website settings? I will try and ask it on their forum then. Renaming the .htaccess file didn't do anything.
Thank you for your time
Thank you for your time