You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Raquel Rice <ra...@thericehouse.net> on 2002/01/31 19:52:14 UTC

Redirection

I have a site that used to be on a server where I had no access to
httpd.conf, but it was just recently moved to where I do have
access.  Some time back SSI was used for the pages.  Those pages
have recently been rewritten using PHP and MySQL and JavaScript was
used to redirect the visitor from the old page to the new page. 
However, I am just now beginning to use the Apache Redirect.  Below
are the first two Redirect statements.  Everything seems to be
working fine.  However, I don't want to repeat the second line
(except with the proper item name) for as many items there are in
the catalog. 

Redirect permanent /index.shtml
http://trishxs.yellowline.com/index.php
Redirect permanent /harley1200.shtml
http://trishxs.yellowline.com/pages.php?page=catalog

So, my question is, does the parser go through line by line and
evaluate FIFO?  If so, then instead of listing a Redirect statement
for each item I should be able to issue one ...

Redirect permanent /*.shtml
http://trishxs.yellowline.com/pages.php?page=catalog

Am I correct in my thinking?

-- 
Raquel
============================================================
Freedom to be your best means nothing unless you're willing to do
your best.
  --Colin Powell

                              
                              

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Redirection

Posted by Raquel Rice <ra...@thericehouse.net>.
On Thu, 31 Jan 2002 14:25:44 -0500
Joshua Slive "Joshua Slive" <jo...@slive.ca> wrote:

> >
> > Apparently my thinking was not correct.  My test showed that it
> did
> > not work as expected.
> 
> I don't understand exactly what you are trying to do (a set of
> "before" and
> "after" URLs might help), but this should be closer:
> 
> RedirectMatch permanent /(.*)\.shtml
> http://trishxs.yellowline.com/pages.php?page=catalog
> 
> If that doesn't work, you can almost surely do it with
> mod_rewrite, but that
> will be a little more complicated.
> 
> Joshua.

When I learned, I learned the KISS principle.  Besides the above
didn't work.

What I'm trying to do is to redirect from
	http://www.yellowline.com/trishkayr/index.shtml
to
	http://www.yellowline.com/trishkayr/index.php
AND
	http://www.yellowline.com/trishkayr/catalog.shtml
to
	http://www.yellowline.com/trishkayr/pages.php?page=catalog

(There is also the subdomain http://trish.yellowline.com ... same
files, etc)

All of the individual items each *had* their own .shtml page but now
the pages are created dynamically from a database.  Rather than
creating a redirect for each item it would be easier to create one
redirect that would work for each item but would redirect to the
main catalog page.

Does that help clarify some?

-- 
Raquel
============================================================
Freedom to be your best means nothing unless you're willing to do
your best.
  --Colin Powell

                              
                              

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Redirection

Posted by Joshua Slive <jo...@slive.ca>.
> From: Raquel Rice [mailto:raquel@thericehouse.net]

>
> On Thu, 31 Jan 2002 10:52:14 -0800
> Raquel Rice Raquel Rice <ra...@thericehouse.net> wrote:
>
> <snip>
> >
> > Redirect permanent /*.shtml
> > http://trishxs.yellowline.com/pages.php?page=catalog
> >
> > Am I correct in my thinking?
> >
> > --
> > Raquel
>
> Apparently my thinking was not correct.  My test showed that it did
> not work as expected.

I don't understand exactly what you are trying to do (a set of "before" and
"after" URLs might help), but this should be closer:

RedirectMatch permanent /(.*)\.shtml
http://trishxs.yellowline.com/pages.php?page=catalog

If that doesn't work, you can almost surely do it with mod_rewrite, but that
will be a little more complicated.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Redirection

Posted by Raquel Rice <ra...@thericehouse.net>.
On Thu, 31 Jan 2002 10:52:14 -0800
Raquel Rice Raquel Rice <ra...@thericehouse.net> wrote:

<snip>
> 
> Redirect permanent /*.shtml
> http://trishxs.yellowline.com/pages.php?page=catalog
> 
> Am I correct in my thinking?
> 
> -- 
> Raquel

Apparently my thinking was not correct.  My test showed that it did
not work as expected.

-- 
Raquel
============================================================
Freedom to be your best means nothing unless you're willing to do
your best.
  --Colin Powell

                              
                              

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org