Strange things on my site

Topics: User Forum
Sep 28, 2006 at 5:52 PM

I have installed the filter as instructed, used it on a website running Coldfusion 6.1, (Windows 2003 server) and it seems to stop any javascript and styleshhets from working on the site!!! Is there something I am missing???

Thanks in advance.

Sep 28, 2006 at 7:49 PM
likely you have a rule which is rewriting requests for javascript (.js) and .css files, when you did not intend this.

Be sure your filter has a LogLevel of 3 or higher, then check the log files to see how it is rewriting .js and .css requests.

you should be careful to exclude .js and .css if that is what you want. you can do this with a negative lookahead in the match-pattern.

negative lookahead is ?!, so for example, try something like this:

RewriteRule (?!\.(css|js))^/whatever$ index.htm L

Oct 4, 2006 at 1:54 PM

Thanks for getting back to me.

What I'm trying to do is that if someone types in:

the site will keep that url in the address bar but use the following url:

As explained, when I upload the filter the site doesn't display the javascript or css for the site.

This is my code for the ReWrite (Negative Lookaheads):

RewriteRule (?!^/index.cfm)(?!.\/$)(?!.\.html$)^/(.*)$ /index.cfmpage=modules/artist&bandname=$1


Oct 11, 2006 at 2:40 PM
Anybody about on this forum?
Oct 17, 2006 at 9:36 PM
vinny, can you explain what you are hoping to do with that latest rule you posted? In english, what are you trying to do? and can you give me some samples of URLs you would like to be rewritten (should presume these are .html URLs?) and also examples you would like to exclude via negative lookahead.

I'll try to help from there.

Oct 23, 2006 at 5:59 PM

I'm building a website for artists to post music to as well as have a profile page similar to Myspace. Each artist will have a name, for example I might call myself 'vinnymo'. To make things easier for the artists, if they want to direct people to their site, rather than get them to type:

I want them to be able to type:

And take them to the exact same page.

I made an attempt to do this but the site doesn't display the javascript or css for the site. The whole site is driven by Coldfusion, therefore all pages are dynamic.

Any help would be appreciated.


Oct 27, 2006 at 12:43 AM
ok, that helps.

Now, can you do this:
- stop IIS
- start IIS
- user browser to tickle
- post the relevant sections of the IIRF log file that results.
- also post your ini file.

here's what I think:

The dynamically generated page from your index.cfm module is referencing .js and .css in the html content. This causes the browser to request those things in additional requests sent to the server. I don't know what those URLs look like , but what I suspect is, your rewrite rule is catching them, and... rewriting them to something invalid.

This is why I suggested, earlier, to exclude .js and .css from your rule. I am not sure your rule is doing that. I don't see any .js or .css in your rule?

Part of the problem is this forum system is interpreting the RewriteRule syntax as markup instructions, and is inserting links and whatnot, where it should just be keeping it as plain text. That is a separate problem. . .

Nov 13, 2006 at 4:02 PM

I'll do this and get back to you ASAP.