Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PHP-DB] URL question
a 404 script is the way I would handle it.

Modify what the server does when it finds a page that doesn't exist.
Currently the server issues 404 headers and displays a brain dead message
about not being able to find the page.  Change that so that the server
issues 200 headers (tricking the client which has "friendly error message"
enabled) and pick off the part after the .com/ and do a look up for the
item.  If found, proceed as expected, it not found display, a brain dead 404
message.

How do you modify the server?
Either modify the 404 directive in apache or one of the other lesser
products
or
setup a .htaccess file on their domain

The .htaccess has a line that says:
ErrorDocument 404 /new.php

Which means when the page is not found display the page /new.php

Build your product look up and place it in the file new404.php

Be sure that the first line of new.php is
<?header("HTTP/1.0 200 OK");

That's the header that tricks the "Friendly Error Message"

I wish I had come across this info as easily as you just did!

Mark Cain




----- Original Message -----
From: "Chris Payne" <cjp@planetoxygene.com>
To: <php-db@lists.php.net>
Sent: Friday, April 29, 2005 11:00 PM
Subject: [PHP-DB] URL question


> Hi there everyone,
>
>
>
> My client needs to be able to have their url www.blahblah.com
> <http://www.blahblah.com/>  pickup the product number but I can't do it
the
> way I'd want (which would be www.blahblah.com/?mls=examplenumber, instead
> they said it MUST be www.blahblah.com/examplenumber - how can I grab the
> number AFTER the .com in PHP so that I can process it with MySQL without
it
> being assigned a variable name, just the number?
>
>
>
> Chris
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Mark Cain
04-30-05 08:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:20 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.