PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > transparent URL redirect?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

transparent URL redirect?

Réponse
 
LinkBack Outils de la discussion
Vieux 24/08/2006, 22h56   #1
dubing@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut transparent URL redirect?

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

  Réponse avec citation
Vieux 25/08/2006, 18h54   #2
Bob Smith
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: transparent URL redirect?

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".
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h41.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09504 seconds with 10 queries