sub folder

Problems with the Windows version of XAMPP, questions, comments, and anything related.

sub folder

Postby jomla » 10. December 2016 15:13

Hi at all
online with OS linux apache accept <img src="../images/image.png">
instead xampp accept <img src="images/image.png">

What is always right?
jomla
 
Posts: 10
Joined: 18. November 2016 20:27
XAMPP version: 3.2.2
Operating System: Windows 10

Re: sub folder

Postby gsmith » 10. December 2016 17:19

it all depends on folder structure and where the calling document is

<img src="images/image.png">
Code: Select all
/home
  |- /docroot        <-- calling document (*.html/php/etc.) is here
        |- /images   <-- images are here

<img src="../images/image.png">
Code: Select all
/home
  |- /docroot
        |- /images   <-- images are here
        |- /subdir   <-- calling document (*.html/php/etc.) is here
gsmith
 
Posts: 218
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win XP to 2012R2/VS 6,9,11,14

Re: sub folder

Postby Nobbie » 10. December 2016 22:07

gsmith wrote:it all depends on folder structure and where the calling document is


.. and also it depends on the setting of DocumentRoot, it depends on ALIAS Definitions and last not least on rewrites/redirects/proxies/reverse proxies etc. in .htaccess and/or in the Apache configuration. And i am still unsure, if i haven't overlooked something...
Nobbie
 
Posts: 9801
Joined: 09. March 2008 13:04

Re: sub folder

Postby gsmith » 11. December 2016 20:32

Nobbie wrote:.. and also it depends on the setting of DocumentRoot, it depends on ALIAS Definitions and last not least on rewrites/redirects/proxies/reverse proxies etc. in .htaccess and/or in the Apache configuration. And i am still unsure, if i haven't overlooked something...


Well /docroot = DocumentRoot and of course there are many variables as you state but I did not want to muddy the waters for a simple question that for most, not all, has a simple answer. I simply wanted to give the poster the general idea of how relative paths work ... which is what these both are.

I do thank you for pointing out the fact that it can rely on so much more than I have shown.
gsmith
 
Posts: 218
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win XP to 2012R2/VS 6,9,11,14

Re: sub folder

Postby Nobbie » 12. December 2016 12:40

gsmith wrote:I simply wanted to give the poster the general idea of how relative paths work ... which is what these both are.


Thats definateky ok, i only wanted to give a slight clue, that there might happen tons of unexpected things (which of course usually is not the case). My bigger concern with this question is, that i do not have a feeling what the author REALLY wants to know and what the REAL problem is (i dont know, if there is a problem, but i think so). The question "what is always right?" is a lttle bit "fuzzy", it would be easier to describe a problem and ask for a solution.
Nobbie
 
Posts: 9801
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 51 guests