[Xitami] Dynamic URL converstion to static URLs

General ronackgen01 at bellsouth.net
Sat Jan 12 17:17:33 CET 2008


However doing a 404 redirect may prove to be no good in terms of SEO because
some search engines penalize for 404 redirects, especially Google. I found
doing a simple PHP redirect to work out better for me. I use it on all my
PHP CMS sites, use it as a sitemap and have a shorturl redirect site like
TinyURL. 

I call the script shorturl and it can be generated very easy with a PHP
script. It can take something like 

http://www.causewaylighting.com/index.php?topic=bulbs_&menu=bulbs_

and rewrite it to this

http://www.causewaylighting.com/surl/bulbs.php

Here is the PHP script that I use

<?php
$shorturl =
'http://www.causewaylighting.com/index.php?topic=bulbs_&menu=bulbs_';
header("Location: $shorturl");
?>

I also have a modified version that instead of creating a specific page name
it creates a directory with one file index.php so then the rewrite would be.

http://www.causewaylighting.com/bulbs
or 
http://www.causewaylighting.com/bulbs/index.php

Since most browsers if not all browsers assume index.php you can usually
leave it off.

Also some CMS's actually provide their own version of rewrite. I'm pretty
sure Geeklog does and maybe NukePHP.

Ron

-----Original Message-----
From: xitami-bounces at lists.xitami.org
[mailto:xitami-bounces at lists.xitami.org] On Behalf Of Francis Turner
Sent: Wednesday, January 09, 2008 4:51 PM
To: Xitami Users General Discussion
Subject: Re: [Xitami] Dynamic URL converstion to static URLs

Actually assuming the use of Xitami 2.5 with GSL working then the 404
rewrite is extremely possible because - assuming there is as
reasonable rule - then conversion of the old URL to the new one within
the error page is quite possible This allows you to say "ooops moved
here" and auto move it via a meta http redirect

GSL is a somewhat limited scripting langauge but entirely adequate for
this sort of job assuming the conversion rule is well known and easy
to use. You may even be able to figure out how t make Xitami generate
moved rather than 404 messages although I never figured that out.

On Jan 8, 2008 9:32 PM, Magnus Wedberg <mw at 9000.org> wrote:
> One option would be to just use the 404 page for
> everything (don't laugh!), handling your own internal redirects, but if
> I am not mistaken Xitami doesn't allow scripting in error pages (my
> memory is a little sketchy here but I'm pretty sure I have tried such
> things).
>
> --
> Magnus Wedberg
> http://www.magnuswedberg.com/
> mw AT 9000.org
> Warning! Objects in viewfinder may be closer than they appear.
>
>
> --
> 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


-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.17.13/1214 - Release Date: 1/8/2008
1:38 PM




More information about the Xitami mailing list