RE: Redirection

Matthew,
 
mod_rewrite on Apache (or similar approaches on other server software) are
your friend. Take for instance our news pages at www.salford.ac.uk/news/: each
news item has its own url (e.g. www.salford.ac.uk/news/details/201/) but what's
effectively happening is that, internally and totally transparent to the user, the page
being displayed is actually www.salford.ac.uk/news/news.php?id=201 (which you
cannot access directly this way now, as there's a redirection in place to catch people
trying to do that sort of thing). The rewrite rule is trivial, and for all it knows google
is seeing a myriad of static pages. I don't have access to the httpd.conf at the
moment (I'm actually at home, on leave ;) ), but it's something like:
 
RewriteEngine on
RewriteRule ^/news/details/(.*) /news/news.php?id=$1
 
news.php then does a bit of sanity checking on the GET parameter that was passed
on, and voila...
 
Just my GBP0.02
 
Patrick
________________________________
Patrick H. Lauke
Webmaster
External Relations Division 
Faraday House 
University of Salford 
Greater Manchester 
M5 4WT 

Tel: +44 (0) 161 295 4779

e-mail: webmaster@salford.ac.uk
www.salford.ac.uk

A GREATER MANCHESTER UNIVERSITY  

 -----Original Message----- 
 From: Matthew Smith [mailto:matt@kbc.net.au] 
 Sent: Tue 11/11/2003 05:48 
 To: WAI Interest Group 
 Cc: 
 Subject: Redirection
 
 


 Greetings
 
 I have a situation where a number of documents were served from a
 database and generated 'on-the-fly'.  These documents were all accessed
 from a single URI, with the query string selecting the document.
 
 To enable Google to index the material, the documents are being
 re-created as HTML documents rather than dynamic ones.  The original URI
 will still provide the listings (and metadata), but the links will be to
 the new HTML documents.
 
 The problem, as I see it, is that calling the URI with the old 'display
 document' query string will no longer work since the document content
 will no longer be stored in the database.
 
 Would it be acceptable to send an HTTP 301 code from the programme to
 redirect the user agent to new document location (the HTML file)?
 
 I appreciate that the Guidelines don't like META element redirects, but
 what about this technique?
 
 I don't see how this could constitute an accessibility problem unless
 the user agent were unable to process a 301, but then is every UA fully
 aware of every HTTP code?
 
 Cheers
 
 M
 
 --
 Matthew Smith
 Kadina Business Consultancy
 South Australia
 http://www.kbc.net.au
 
 

Received on Tuesday, 11 November 2003 08:12:15 UTC