View Full Version : Double url address

02-01-2010, 02:59 PM
Hi Guy's

I'm new to this forum but i really need help so i'm hoping that someone here may be able to put me on the right track. My brother ( only his 2nd time using dreamweaver so his knowledge is limited ) designed his site using cs3. I joined in to help him with the harder stuff ( contact form validation sending etc. ) so i wasn't there from the start. I know he made his site from one of the templates in cs3, but the problem that is now happening is that when the site is uploaded and you go onto the web to look at it, the home page is there but when you click on one of the links for a new page ( home, contact us etc. ) we get a 404 error and the address in the url looks like this "www.mysite.com/www.mysite.com/index.html" ( or contact.html etc. whichever link you click on ) it's adding in an extra www.mysite.com when you click on a link. Yet if we delete the extra "www.mysite.com" and just leave it as www.mysite.com/index.html it goes to the right page. I was talking to the hosting company and their tech guys looked at the files up there and they said that the problem was with dreamweaver. I made a test page from his template pages and adding in a facebook image with a link to facebook but again when you go to that page and click on the link, a 404 appears and the url address is like this "www.mysite.com/www.facebook.com.
I really don't want to delete all his work and start again so before i did i was just wondering does anyone know why cs3 is adding in the extra "www.mysite.com" and is there an easy way to fix this or even if someone could tell me where i should start looking to find the problem. I don't know if this makes a difference but when you save a new page, if you just do command s ( mac ) it wants to save that page as a template so if you go to file-save as you can save it as a html page although what appears is on the page itself is say: contact.html (XHTML). I have been digging through his site but he doesn't remember the way he set up the template and at this stage i'm getting snow blind looking at his site i reckon even if the solution was right in front of me i'd miss it.
I would be really thankful if anyone could help me with this, any bit of advice would be greatly appreciated.

02-01-2010, 03:47 PM
Dreamweaver is adding 'www.domain.com' to all your links. Can you confirm that the Site definitions are set up right?

02-01-2010, 04:36 PM
Thanks a million for getting back. i presume by "site definitions" you are talking about site-manage site and then filling in the details about the local and remote servers, ftp, directory etc. if thats the case yeah i check all those and they are filled in right and even when i tested it a message came back saying there was no problems connecting to the server.

Here is the actual website address that i'm working on it's www.childprotectionservices.ie
if you click on any of the links on that page, that 404 error will appear with the double url in the url bar.
The funny thing is if you type www.childprotectionservices.ie/Index.html into the url bar the same home page appears but for some reason the contact tab/link works while all the rest will just give 404 errors.
One thing that the hosting company said was that my index.html page had to be in all lower case letters but no matter what way i try save that page in cs3 it always saves as Index.html i don't know if this effects it any way, but when i type in www.childprotectionservices.ie/index.html it comes back with the error saying that this page doesn't exist but the address with the capitol "I" does www.childprotectionservices.ie/Index.html
like i said at this stage i could have looked over the solution and wouldn't even realise it. So thanks again for any help you can give.

02-01-2010, 04:55 PM
Your hosts are correct, you shouldn't really use CAPS in file names...and that goes for computers in general. No CAPS and no spaces.

As for the original issue. I'd have suggested exactly what Domedia did. I'd say it is a site definition problem. Have you defined root folders etc?

Also at any point has updating templates asked you if you'd like to 'update links'? I've had this throw a site into confusion before. That was the point I stepped away from .dwt and used 'includes' for updates.

02-01-2010, 05:22 PM
I suspect he's entering links like this:


since the link isn't preceded by http:// DW assumes that the link is to a file on his website and looks for a file named index.html INSIDE a folder named www.mysite.com

In Dreamweaver, the link should look like this: index.html (for links relative to the document) or this /index.html for links relative to the site root.

You could also just use the complete link including the http:// like this http://www.mysite.com/index.html but it's redundant and bad form.

If he's entering the links by hand in DW, he could avoid the problem by clicking the folder icon next to the link field in the properties inspector and selecting the file he's linking to that way.

02-01-2010, 05:26 PM
Thanks for your post. No i don't want to use Caps but when i save any page, it puts the first letter into Capitals no matter what word i use if i click "save as" index.html , once it saves the page, when i look at the list of items that is my site on the right file menu the page would be saved as Index.html i can't understand why it keeps doing it. Also if i am working on any page on the site if i click "command s" ( mac ) it wants to save the page as a template instead of a .html page ( should i be letting it save the pages as templates ) , I think when i made changes on the .dwt page it only asked me twice if i would like to update links. if i make any changes on it now it never asks me.
I cleared the site definitions that were already in their and i started again but so far no joy. Would it be simpler at this stage just to scrap this site and start again? I just didn't want to do that if it was only a simply thing with this site that could be fixed.

Thanks for helping.

02-01-2010, 05:31 PM
Would it be simpler at this stage just to scrap this site and start again? I just didn't want to do that if it was only a simply thing with this site that could be fixed.

Yeah, that does seem a bit drastic. I think DWCourse advice is good. If you do scrap it then try this method for updates; http://www.dreamweaverclub.com/php-includes.php
You have the right idea wanting to easily update stuff but I still find templates a bit troublesome sometimes.

02-01-2010, 05:58 PM
I don't think you understand templates in Dreamweaver.

First you create the template and save it as a template (.dwt) file.

To create a new page from the template, you:

select menu: File>New
select the Page from Template option
select the template you want to base the new page on
click create

You Never create a new page by doing a Save As from a template. If you do, the page will have special elements in it that are only used in templates and DW will keep wanting to convert it into a template when you save it.

02-01-2010, 06:08 PM

Thanks a million. That was the answer i was looking for. My brother built the site but just built the site from a template and just made new pages by doing the save as feature. Basically i'm just gonna delete all the pages that he made and start again with his template and make all the pages again from scratch at least i'll have his template to work with and i'll know exactly what's going on, so it shouldn't take me that long. Hopefully that will iron out the issues. I know it had to be something simple none of the other sites i built with cs3 have given me any trouble like this.

Thanks a million to everyone who helped me with this problem seriously much appreciated.