Jump to content

directory problems


doddsey_65

Recommended Posts

i am using mod_rewrite for seo friendly urls. Take this page for example

 

http://www.thevault.cz.cc/new_post/thread/forum_and_site_news/welcome_to_asf

 

that page calls a js file located in:

 

root/modules/parser.php

 

the problem i am having is calling that file using javascript. when i use relative paths ./modules/parser.php it doesnt work.

but even using absolute paths doesnt work. it adds the full url onto the existing one so it becomes:

 

http://www.thevault.cz.cc/new_post/thread/forum_and_site_news/welcome_to_asf/http://www.thevault.cz.cc/modules/parser.php

 

is there a way to do this properly?

 

to get the absolute path in the js file i am using:

 

document.location.protocol + "//" + document.root.hostname + "/modules/parser.php"

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.