Site structure
Version 5.x > Site structure > Url problem on localhost View modes: 
User avatar
Member
Member
ercaneraslan-gmail - 7/14/2011 3:59:50 AM
   
Url problem on localhost
Hi

i am trying to show site on localhost. i setup database connect it to website and open it. but there is a problem on urls.

some urls (especially images which are stored in database) are shown like:
http://localhost/sitename/~/AppThemes/sitename/imagename.jpg

so the link looks like broken because there is no folder like "~" in my site.

also some links in my footer are like
http://localhost/sitename/~/Products/Categories.aspx

how can i fix this? what is my mistake? is it something related with IIS or coding?
note: the site works perfect on live.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 7/19/2011 6:05:22 PM
   
RE:Url problem on localhost
Hello.

~ sign means relative URL and usually it is replaced by site´t root (domain), so you get full URL. So the problem may be related to how your localhost site is configured, or to the fact you probably connected database to your web site somehow manually (maybe you just changed connectionString, I don´t know).

If you have second instance where you site is running fine and you want to move it on your local machine, I would recommend you to use export / import functionality. You can simply export your live site and import it on your local machine (into some existing and running instance). Everything should be fine then. Could you please try it?

Best Regards,
Radek Macalik