[Xitami] Site redirects

Francis Turner francis.turner at gmail.com
Sat Dec 17 18:04:27 CET 2005


Looks to me like once you enable errors.gsl you can then tinker to
your hearts content. For example I just verified that the following
tiny errors.gsl will redirect to idx.php with two relevant get fields
the page (pg) and the referer (ref)

There is no reason at all why you cannot fully specify the URL so that
it goes to a different domain. And, if you muck around with the
permissions, no reason why this should only apply to errors i.e. to
URLs that do not exist. Alternatively you could do a check on
errorcode and only do the redirect if it is a 404 but otherwise leave
the standard error page

----
.output tempfile
<HTML><TITLE>Error - $(errorcode)</TITLE>
<meta http-equiv="Refresh"
content="1;url=/idx.php?pg=$(server_url:)$(substr
(urlbase,1,,))&ref=$(HTTP_referer:)">
<BODY><H1>
<BODY BGCOLOR="#ABCDEF">
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%">
<TR><TD COLSPAN=3 BGCOLOR="#123456" ALIGN="center"><FONT
COLOR="#FF6666"><H2>Web Server Error $(errorcode)</H2>
<H3>$(errortext:)</H3>
.if defined (message)
<P>$(message:)
.endif
</font>
</body></html>

On 12/17/05, Paul J. Smith <pjsmith at mtgsy.net> wrote:
> Hi,
>
> Thanks.
>
> Tried that, but it's very messy.  I want to log the original URL, and
> Xitami does not seem to support a PHP page as the error page?  It's a
> pity the error page can't be an external URL.  That'd work great.
>
> -----Original Message-----
> From: xitami-bounces at lists.xitami.org
> [mailto:xitami-bounces at lists.xitami.org] On Behalf Of Francis Turner
> Sent: 17 December 2005 15:53
> To: Xitami Users General Discussion
> Subject: Re: [Xitami] Site redirects
>
> You should be able to do this by creating a custom 404 page with an
> appropriate meta tag to redirect in the header
>
> i.e. <meta http-equiv="Refresh"
> content="1;url=http://www.mydomain.com/index.php">
>
> You could use Xitamis GSL langauge to make the refirect depend on what
> the wrong page was if that gave you pleasure. Take a look at
> templates/errors.gsl for hints about what to do
>
> Francis
>
> On 12/17/05, Paul J. Smith <pjsmith at mtgsy.net> wrote:
> > Hi,
> >
> > I only just started experimenting with Xitami.
> >
> > There's one thing I currently can't figure out how to do.  I have a
> site
> > where I want all requests, including ones for pages that do not exist
> to
> > go to the home page.  With IIS I just use the redirect to an exact url
> > feature.  I can't seem to get the same functionality with Xitami.
> >
> > To explain
> >
> > Page /index.php exists
> > User requests non existent page /testing/test.php
> > User gets sent to /index.php
> >
> > Is this possible?
> >
> > Thanks.
> >
> >
> > --
> > Xitami Users Mailing List -- For Xitami support
> > To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
> >
>
>
> --
> http://www.di2.nu/blog.htm
> Faber's Fourth Law:
>   Necessity is the mother of strange bedfellows.
>
>
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
>
>
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
>


--
http://www.di2.nu/blog.htm
Faber's Fourth Law:
  Necessity is the mother of strange bedfellows.



More information about the Xitami mailing list