Alias help with links

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

Alias help with links

Postby Streak » 30. June 2008 14:10

What I have is a set up that looks like this:

Alias ~jomc "/opt/lampp/htdocs/Departmetns/JOMC"

Inside some of my files I have links that point like this:

"../something/something.js"

The links aren't loading correctly, mostly dealing with Java script inclusion. What I've noticed ist hat the ".." is messing it up, if I do "http://mydomain.com/something/something.js" it will load up fine. The problem is with some of the javascript stuff I didn't create them myself, and they all have references in them pointing to other files in the same fashion as I'm doing, which is causing trouble.

How can I have it so that references in my files to "../something/something.js" will translate properly when using Alias? I figured Alias just masked the true URL to give a "prettier" look to your URLs, however I see I was mistaken it's not just masking it's doing something else that I was unaware of.

Thank you for your help!
Streak
 
Posts: 6
Joined: 30. June 2008 14:03

Postby Streak » 01. July 2008 13:09

Anyone at all able to help with this or give a suggestion? I've tried searching for it, but I've yet to find anything that tells me anything particular that helps.
Streak
 
Posts: 6
Joined: 30. June 2008 14:03

Postby Streak » 01. July 2008 14:41

Perhaps I should mention the ../something/something.js is actually located otuside the Aliased directory, I just thought of that and figured that may actually be the reason it's giving me a file not found error.

What I have directory structure wise is like this

Containing Directory
|
|
+Something
|------+Something.js
|
+JOMC
|-------+File refercing Something.js with '../Something/Something.js'

The Something Directory is a Directory that houses a lot of included files that get included inside the other directories inside the Containing Directory. It's a pretty straight forward File Structure, simple, clean and organized. I fixed the issue by refercing the Something.js file like this: 'http://mydomain/Something/Something.js' and it works. However I hate refercing files over an http call, I'd rather reference them locally. I've tried a few things with php such as using $_SERVER['DOCUMENT_ROOT'] and so forth, but nothing is really working. If anyone has a better suggestion then using an http reference I'd love to know it, if not I guess I'll just have to keep using the http reference until I can figure out another method with Alias.
Streak
 
Posts: 6
Joined: 30. June 2008 14:03


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 4 guests