0

my files structure is:

  • c:\wamp64\www\my_project\my_file.php
  • c:\wamp64\www\my_project\scripts\jquery.min.js

when using on a real URL, I used to have

<base href="http://www.my_site.com" >
<script src="/scripts/jquery.min.js"></script>

and all works well.

now, I try to work on local WAMP server,

I tried some versions:

<base href="http://localhost/my_project" >
<base href="http://localhost/my_project/" >
<base href="http://my_project" >

but the JS file is not found.

I can see the following lines in firebug:

GET http://localhost/scripts/jquery.min.js [HTTP/1.1 404 Not Found 1ms]
...
ReferenceError: $ is not defined

what code should I use for BASE tag, so JS files will be found?

Atara
  • 3,523
  • 6
  • 37
  • 56
  • 1
    You chold create an Apache Virtual Host for each of your projects, then your base tag would be as you expect i.e. `'. Here is an anwer [that should help](http://stackoverflow.com/questions/23665064/project-links-do-not-work-on-wamp-server/23990618#23990618) – RiggsFolly May 21 '17 at 15:43
  • thanks. this solved my problem – Atara May 23 '17 at 11:37

0 Answers0