Lance
Lance

Reputation: 63

jQuery and url re-write

I am having a wierd error and jQuery not working depending on how the url is written.

if the url is

/index.cfm?show=about-us

all is good. BUT if the url is

/index.cfm/show_about-us

jQuery doesn't seem to load correctly and I get a "$ is not defined" error in fireBug

I can't use the standard ?= query string I need to be able to use the re-write method.

Any ideas are appriciated Lance

Upvotes: 0

Views: 1316

Answers (3)

irama
irama

Reputation: 658

That's it. @recursive got it in one.

Consider using the absolute path from the root of your domain in src attributes. For example: <script src="/jquery.js">

Upvotes: 0

Lance
Lance

Reputation: 63

Sorry this was a reference issue to the files. Evendently in that re-write sytle the dom is still trying to navigate the file system starting in the /show_about-us/ directory which isn't truely a directory.

Upvotes: 0

recursive
recursive

Reputation: 86064

What does your <script src="..."> say? I have a feeling it's looking for /index.cfm/jquery.js which doesn't exist.

Upvotes: 1

Related Questions