![]() |
![]() ![]() |
![]() |
LargeAllen |
![]()
Post
#1
|
Group: Members Posts: 3 Joined: 3-November 22 Member No.: 28,619 ![]() |
I need to construct a URL string when using images or subfiles.
This is really needed so I don't have to input a long string hundreds of times. It only makes sense to just have file names in the body, so when I transition to the host site I only would need to make one string change. |
pandy |
![]()
Post
#2
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 ![]() |
Sorry, I don't understand what you want to do. Can you explain?
|
pandy |
![]()
Post
#3
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 ![]() |
Or wait. Maybe I do understand. Do you mean you want the same URLs to work on your local machine and on the server, when you've uploaded your stuff?
If so use relative URLs. As long as you keep the same file structure they'll work anywhere. https://htmlhelp.com/faq/html/basics.html#relative-url That is if you for example have your HTML files in one folder and inside that folder you have another folder called "images" where you keep all your images you can use URLs like this in the IMG tags. CODE images/picture.jpg |
LargeAllen |
![]()
Post
#4
|
Group: Members Posts: 3 Joined: 3-November 22 Member No.: 28,619 ![]() |
Or wait. Maybe I do understand. Do you mean you want the same URLs to work on your local machine and on the server, when you've uploaded your stuff? If so use relative URLs. As long as you keep the same file structure they'll work anywhere. https://htmlhelp.com/faq/html/basics.html#relative-url That is if you for example have your HTML files in one folder and inside that folder you have another folder called "images" where you keep all your images you can use URLs like this in the IMG tags. CODE images/picture.jpg Do I understand this correctly ? I do the local work on my laptop in the folder c:/myname/website/ Everything is within this folder. When I'm happy with what I see, I transfer it to my website in bulk. Since I use 'relative' url's, it does not matter what the url is of the website, it will simply work. Am I missing anything? |
pandy |
![]()
Post
#5
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 ![]() |
I think you understand it right. Transfer the content of the website folder though, not the whole folder. You don't want a folder named website up there.
|
LargeAllen |
![]()
Post
#6
|
Group: Members Posts: 3 Joined: 3-November 22 Member No.: 28,619 ![]() |
|
pandy |
![]()
Post
#7
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,733 Joined: 9-August 06 Member No.: 6 ![]() |
Good. You're welcome.
![]() |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 27th April 2024 - 07:42 AM |