Rewrite URL - how to get the hostname and the path?

Posted by buggy1985 on Stack Overflow See other posts from Stack Overflow or by buggy1985
Published on 2010-05-20T15:43:45Z Indexed on 2010/05/20 18:40 UTC
Read the original article Hit count: 260

Filed under:

Hello,

I want to use mod_rewrite to hide the URL, that generates my XML file.

So if this is the requested URL:

http://www.domain.com/path/to/ page ? cid=8001&srt=po

This URL should be executed:

http:// www.xmldomain.com/bla/page ? cid=8001&srt=po &rtype=xslt&xsl=http://www.domain.com/path/to/ page .xsl*

$1 should be http://www.domain.com/path/to/ (How can I do this?)
$2 should be page
$3 should be cid=8001&srt=po

Thanks!

© Stack Overflow or respective owner

Related posts about mod-rewrite