File Not Found error for image file if name is not fully qualified

Status
Not open for further replies.

belltown

Member
Messages
97
Reaction score
4
Points
8
I can access my image file by using this URL: http://belltown.x10hosting.com/bbmap.org/icons/r1-20.png

I can access a test html script either using http://belltown.x10hosting.com/bbmap.org/junk.html or http://bbmap.org/junk.html (bbmap.org is an add-on domain).

My test script can access the image file if I code it as:
Code:
<img src="http://belltown.x10hosting.com/bbmap.org/[URL="http://x10hosting.com/forums/view-source:http://bbmap.org/icons/r1-20.png"]icons/r1-20.png[/URL]"></img>

However, if I try using this code:
Code:
<img src="[URL="http://x10hosting.com/forums/view-source:http://bbmap.org/icons/r1-20.png"]icons/r1-20.png[/URL]"></img>

then I get a file not found error for my png file. The code works correctly if I run the html script as http://belltown.x10hosting.com/bbmap.org/junk.html but NOT if I specify the name of my add-on domain, http://bbmap.org/junk.html

Why can I not access the image file from my html script unless I fully qualify the file name?

Image hotlink protection is disabled.

Here is the code for my .htaccess file in my public_html directory:

Code:
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName belltown.x10hosting.com
AuthUserFile /home/belltown/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/belltown/public_html/_vti_pvt/service.grp
AddType application/x-httpd-php5 .html .htm
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Could you see if there is a .htaccess file in public_html/bbmap.org/ ?
 

belltown

Member
Messages
97
Reaction score
4
Points
8
I do not have a .htaccess file in public_html/bbmap.org.

Do I need one and if so, what should it contain?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Well, a request for bbmap.org/index.html results in 302 Moved Temporarily headers being sent and redirected to bbmaphelp.html

So you have a redirect or .htaccess rewrite set up somewhere.
 

belltown

Member
Messages
97
Reaction score
4
Points
8
My bbmap.org/index.html file contains PHP code to redirect the user to bbmaphelp.html if the user is not accessing the web page from a BlackBerry browser. This is not done using .htaccess.

My application (when run from a BlackBerry) loads icon files from the bbmap.org/icons directory. Before I set up bbmap.org as an add-on domain, everything was working well when I had my code in public_html/BBMap. I could refer to the icon files as icons/r1-9.png etc.

After I set up my bbmap.org domain I copied public_html/BBMap to public_html/bbmap.org and the same code no longer works. As I said before the code works if (a) I fully qualify the image file name within my html code, or (b) run my web page using its x10hosting domain name. The code does NOT work if I use a relative file name for my image file AND run the web page using the add-on domain name.
 

Jarryd

Community Advocate
Community Support
Messages
5,534
Reaction score
43
Points
48
Hello,

Sorry for the large delay in any replies to your issue, can you please confirm that the case you are using is correct, linux being case sensitive requires all case to be the same throughout your code, filenames and directories.
 

dlukin

New Member
Messages
427
Reaction score
25
Points
0
It seems that your system for some reason messes up a directory named 'icons' . Seems to be the case not just in subdomains. Maybe a directory alias directive in the Apache httpd.conf file or something similar?
Spelled correctly.
Capitalized correctly.
Nothing in .htaccess that would do it.
 

belltown

Member
Messages
97
Reaction score
4
Points
8
Yes, I did more troubleshooting and determined that the problem only occurs on the /icons subdirectory. I created an identical directory named /iconz ('z' instead of 's') with the exact same files, exact same permissions and double-checked spelling, capitalization, etc. I can access all files in /iconz but no files in /icons.

My guess is that there's something in the main Apache configuration file, maybe an Alias /icons directive or something similar that's redirecting my requests for the /icons directory to somewhere Apache uses for its own purposes. Do you have any way to look at httpd.conf to verify that?

Thanks for looking into this.
 

Jarryd

Community Advocate
Community Support
Messages
5,534
Reaction score
43
Points
48
Have you tried deleting the directory and re-creating it..?
 

belltown

Member
Messages
97
Reaction score
4
Points
8
This thread was closed, yet the problem was never resolved. Could you please continue to look into the issue.
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
I think this is due to the way apache handles it's 'internal' icons, that it uses for file descriptions, etc. I am going to do some more research with this in a few minutes and I'll let you know.
 

belltown

Member
Messages
97
Reaction score
4
Points
8
I think this is due to the way apache handles it's 'internal' icons, that it uses for file descriptions, etc. I am going to do some more research with this in a few minutes and I'll let you know.

So did you do that research and come up with an answer?
 
Status
Not open for further replies.
Top