1

I have a request to redirect multiple individual URLs to new individual URLs. This is the situation:

**Old URL                         -->     New URL**
old.domain.org/                   -->  new.domain.net/inf/site1.html
old.domain.org/#data/re/sys.html  -->  new.domain.net/inf/site2.html 
old.domain.org/#data/rq/opr.html  -->  new.domain.net/inf/site3.html

I created a redirect file with this code:

$HTTP["host"] == "old.domain.org" {
       url.redirect = ("^/$" => "http://new.domain.net/inf/site1.html",
       "^/#data/re/sys.html" => "http://new.domain.net/inf/site2.html",
       "^/#data/rq/opr.html" => "http://new.domain.net/inf/site3.html"
       )
}

But this does not work for me; because, when i go to http://old.domain.org/#data/re/sys.html the lighttpd redirect to http://new.domain.net/inf/site1.html#data/re/sys.html ... that does not exist.

I'm not developer, but I think that the problem is the "#" character.. someone said me that thats part is a javascript function. So, how I do to go to old urls to the new urls?

Thanks

the0
  • 11
  • 2

1 Answers1

0

The fragment identifier (i.e. the '#' and everything after it) of an URL is not sent to the HTTP server at all. It can be interpreted by javascript as you said, by default a browser tries to show the HTML element with the id.

Stefan
  • 859
  • 1
  • 7
  • 18