|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
Apache 2.0.52 RHEL 4 We're hosting multiple websites. Our directory structure is like this: /var/www/html/sites/dept1/dept1_group1/index.html .... dept2/dept2_group1/index.html The DocumentRoot is /var/www/html/sites. The customer prefers short URL and therefore wants http://www.dept.some.edu/dept1_group1 to work even though their real web pages are stored in /var/www/html/sites/dept1/dept1_group1/ which is not right under the DocumentRoot. So we did redirect 'http://www.dept.some.edu/dept1_group1' => '/dept1/dept1_group1/index.html' The redirection works fine. Now the customer came back asking if the pages can be displayed without changing to the long URL at all. Is that possible? I called it transparent redirection because they want it to take place behind the sences without visitors noticing any URL change. I'd appreciate any ideas or thoughts. Thanks, Bing |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 8/24/2006 5:56 PM, dubing@gmail.com wrote:
> Hello, > > Apache 2.0.52 > RHEL 4 > > We're hosting multiple websites. Our directory structure is like this: > > /var/www/html/sites/dept1/dept1_group1/index.html > .... > dept2/dept2_group1/index.html > > The DocumentRoot is /var/www/html/sites. > > The customer prefers short URL and therefore wants > http://www.dept.some.edu/dept1_group1 to work even though their real > web pages are stored in /var/www/html/sites/dept1/dept1_group1/ which > is not right under the DocumentRoot. So we did redirect > > 'http://www.dept.some.edu/dept1_group1' => > '/dept1/dept1_group1/index.html' > > The redirection works fine. Now the customer came back asking if the > pages can be displayed without changing to the long URL at all. Is > that possible? I called it transparent redirection because they want > it to take place behind the sences without visitors noticing any URL > change. Use mod_rewrite: RewriteRule ^/dept([0-9]+)_group([0-9]+)/(.*)$ /dept$1/dept$1_group$2/$3 [L] -- _________________________________________ Bob Smith -- bsmith@sudleydeplacespam.com To reply to me directly, delete "despam". |
|
![]() |
| Outils de la discussion | |
|
|