Project

General

Profile

Loading Dynamic JS

Added by vishnu81 over 12 years ago

Hi,

I am using lighttpd/1.4.28 on Ubuntu 12.04.1.

I have these rules in my lighttpd.conf

$HTTP["host"] == "admin.example.com" {
  server.document-root = "/var/www/example" 
  index-file.names = ( "index.php")
  accesslog.filename = "/var/log/lighttpd/access.example.log" 
  url.rewrite = (
      ".*\.(js|ico|gif|jpg|png|swf|css|xml|mp4)$" => "$0",
      "^/(.*)$" => "index.php/$1" 
  )
}

I wanted two things to happen when i used Codeigniter on admin.example.com
1. All pages should be served as .html
2. All the parameters passed dynamically to JS should work.

The first point works with the rules specified w/o any issues.
But the second doesnt, Can you please let me know what rule i have to add for dynamic JS serving.


Replies (3)

RE: Loading Dynamic JS - Added by stbuehler over 12 years ago

  • What does "all pages" mean?
  • What does "serving as .html" mean?
  • What does "passing parameters dynamically to JS" mean?

RE: Loading Dynamic JS - Added by vishnu81 over 12 years ago

I will better explain with a sample:

http://admin.example.com/register should be shown as http://admin.example.com/register.html.

and in js if i give admin.example.com/js/jquery.js?demo=1, it shows me 404. It shoudnt be so, right?

Thats what i meant :)

RE: Loading Dynamic JS - Added by vishnu81 over 12 years ago

Hi,

I wanted to add that admin.example.com/js/jquery.js does work.

So, any suggestions from anyone?

    (1-3/3)