Discussion:
rewrite rul on http_host
(too old to reply)
Michael Muller
2015-01-15 17:55:46 UTC
Permalink
Hey all,

I'm trying to do an internal URL rewrite similar to this...

RewriteRule ^/news/?$ /index.cfm?p=n.0 [QSA]

... whereby instead it rewrites the http_host (I think) such that this...

http://clientdomain.myhostingcompany.com/hello

... internally maps to this...

http://clientdomain.com/hello

This needs to be a regex global rule, as there are literally hundreds of subdomained URLs that I need to parse and map to the non-subdomained version.

The .com needs to be captured, as the top level domain may be a net or org or us, etc.

Any advice?

Thanks,

Mik
Michael Muller
2015-01-15 17:58:21 UTC
Permalink
Just to make myself clear, the browser needs to see the full subdomained version, but Apache needs to internally use the non-subdomained version, just like the browser sees "/news" in the example above, but internally uses "/index.cfm?p=n.0"

Thanks

Continue reading on narkive:
Loading...