doddsey_65 Posted January 15, 2011 Share Posted January 15, 2011 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" Quote Link to comment https://forums.phpfreaks.com/topic/224496-directory-problems/ Share on other sites More sharing options...
requinix Posted January 15, 2011 Share Posted January 15, 2011 I feel like I should ask more about how the system works... but I won't. Once you have that absolute path, what do you do with it? What's the rest of the code? Quote Link to comment https://forums.phpfreaks.com/topic/224496-directory-problems/#findComment-1159678 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.