quarks
quarks

Reputation: 35276

Reading request headers in Javascript

I need to be able to read the request headers coming from a redirect from a naked domain:

http://mydomain.com

to

http://www.mydomain.com/index.html

I need index.html to be able to parse any original request path and queries, how can I do that?

E.g

From naked domain: http://mydomain.com/abc to http://www.mydomain.com/index.html and then index.html will get the abc path request.

The question is how to be able to achieve this?

A similar question: Using DNS to redirect to another URL with a path

Upvotes: 1

Views: 291

Answers (1)

Angel Fructuoso
Angel Fructuoso

Reputation: 14

use document properties to check and reditect for others questions use navigator roperties

Get referrer use = document.referrer or document.URL

Look : http://www.w3schools.com/jsref/dom_obj_document.asp

In apache the best solution is control that with .httaccess

Upvotes: 1

Related Questions