Bluehost.com Web Hosting $6.95

Diretory Redirection

This is a discussion on Diretory Redirection within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello, Probably an easy one for you Apache Masters! Say I've got these web pages: /index.php /summary.php /...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-29-2005
vendredi5h@gmail.com
 
Posts: n/a
Default Diretory Redirection

Hello,

Probably an easy one for you Apache Masters!

Say I've got these web pages:
/index.php
/summary.php
/doc/info1.php
/doc/info2.php
/test/test1.php
/test/test2.php

Each document included in /doc and /test are listed in summary.php. So
I'd like to configure my .htaccess to redirect both /doc/ and /test/ to
/summary.php (instead of listing directory index). I hope it's clear.

So how can I do that?

Thanks for your time.

Yannick

  #2 (permalink)  
Old 12-29-2005
Justin Koivisto
 
Posts: n/a
Default Re: Diretory Redirection

vendredi5h@gmail.com wrote:
> Hello,
>
> Probably an easy one for you Apache Masters!
>
> Say I've got these web pages:
> /index.php
> /summary.php
> /doc/info1.php
> /doc/info2.php
> /test/test1.php
> /test/test2.php
>
> Each document included in /doc and /test are listed in summary.php. So
> I'd like to configure my .htaccess to redirect both /doc/ and /test/ to
> /summary.php (instead of listing directory index). I hope it's clear.
>
> So how can I do that?


Possibly something like this if I understand that correctly...

RewriteEngine On
RewriteRule ^(doc|test)/?$ summary.php [L]

--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
  #3 (permalink)  
Old 12-30-2005
vendredi5h@gmail.com
 
Posts: n/a
Default Re: Diretory Redirection


Justin Koivisto wrote:
> vendredi5h@gmail.com wrote:
> > Hello,
> >
> > Probably an easy one for you Apache Masters!
> >
> > Say I've got these web pages:
> > /index.php
> > /summary.php
> > /doc/info1.php
> > /doc/info2.php
> > /test/test1.php
> > /test/test2.php
> >
> > Each document included in /doc and /test are listed in summary.php. So
> > I'd like to configure my .htaccess to redirect both /doc/ and /test/ to
> > /summary.php (instead of listing directory index). I hope it's clear.
> >
> > So how can I do that?

>
> Possibly something like this if I understand that correctly...
>
> RewriteEngine On
> RewriteRule ^(doc|test)/?$ summary.php [L]


Works great! Thanks.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:30 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0