httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rui Hu <>
Subject [users@httpd] questions about mod_rewrite
Date Sat, 17 Dec 2011 11:52:59 GMT

I have a question about mod_rewrite. I want to implement a function based
on this module. When users send a request with such url: or Without rewrite module,
original apache will get absolute paths as follows: $DOCUMENT_ROOT/test.php
and $DOCUMENT_ROOT/test.php.
I expect configured rewrite module will translate this url to an absolute
file path: $DOCUMENT_ROOT/1000/test.php and $DOCUMENT_ROOT/2000/test.php.
Namely, the first region of url. Therefore, rewrite module should parse the
request url to get the first region and constitute new url by adding it to
the middle of DOCUMENT_ROOT and REQUEST_URI.

How can I implement this function based on rewrite module? Really
appreciate your help.

Best regards,

Rui Hu
State Key Laboratory of Networking & Switching Technology
Beijing University of Posts and Telecommunications(BUPT)

View raw message