This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > May 2006 > javascript in htaccess file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author javascript in htaccess file
Nospam

2006-05-27, 3:55 am

Is it possible to have javascript in your htaccess file?
If so is can someone point me to an example of it?


David Dorward

2006-05-27, 7:03 am

Nospam wrote:

> Is it possible to have javascript in your htaccess file?


..htaccess files contain Apache directives, which are not typically
JavaScript.

You /could/ use something like PerlSetVar to set a variable to a string
which happens to be JavaScript, then pull that string into an Apache Module
written in Perl, and then process it with SpiderMonkey ... but why would
you want to?

http://search.cpan.org/~tbusch/Java...SpiderMonkey.pm

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Mark Goodge

2006-05-27, 7:03 am

On Sat, 27 May 2006 06:17:35 GMT, Nospam put finger to keyboard and
typed:

>Is it possible to have javascript in your htaccess file?


No. The .htaccess file is read by the server, not the browser, so it
can only contain information that the server understands.

What are you trying to achieve? There's almost certainly another way
of doing it!

Mark
--
Visit: http://www.CorporateContact.info - phone and email contacts for Amazon, Paypal, eBay and lots of other hard-to-contact organisations
Listen: http://www.goodge.co.uk/files/dweeb.mp3 - you'll love it!
Brian Wakem

2006-05-27, 7:03 am

Nospam wrote:

> Is it possible to have javascript in your htaccess file?
> If so is can someone point me to an example of it?



Certainly not, but if you are running mod_perl you can put PERL code into
your Apache config file.


--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
trevor

2006-05-27, 7:02 pm

Nospam wrote:

> Is it possible to have javascript in your htaccess file?
> If so is can someone point me to an example of it?


like totally_not
Don

2006-05-29, 3:48 am

"Nospam" <nospam@home.com> wrote in news:3aSdg.1468$zv2.1235@newsfe4-
gui.ntli.net:

> Is it possible to have javascript in your htaccess file?
> If so is can someone point me to an example of it?
>
>



Assuredly!

"SetEnvIf User-Agent Java keep_out" ;-))
Jerry Stuckle

2006-05-29, 3:48 am

Don wrote:
> "Nospam" <nospam@home.com> wrote in news:3aSdg.1468$zv2.1235@newsfe4-
> gui.ntli.net:
>
>
>
>
>
> Assuredly!
>
> "SetEnvIf User-Agent Java keep_out" ;-))


Java is NOT Javascript!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews