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
https://forums.phpfreaks.com/topic/224496-directory-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.