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

Fwd: Subject: URL question
Easy enough, using Mod Rewrite on apache (you didn't say which server you
use, so I'm afraid you'll have to upgrade if using IIS) : Create a file in
a text editor. Save it as .htaccess (dot-htaccess as the filename) in the
http://www.blablah.com/examples/ directory - not in the root folder or
you'll route every page request on the site through your PHP script. If
you're using [eg notepad], make sure it doesn't save it as .htaccess.txt !

The .htaccess file you create contains the following lines :

RewriteEngine on
RewriteBase /examples
RewriteRule (.* ) /examples/exampleprocessor.php?mls=$1 [L]


That short regex will take any character string and append it to the MLS
query string, which you then process as normal in your PHP script (i.e. as
if the user typed in a URL of
http://www.blablah.com/examples/exa...ls=blahblahblah

Make sure your script works fully with the checked query string before you
do this ;-)

Cheers - Neil

>Message-Id: <200504300300.j3U30Kb6000990@ms-smtp-02.tampabay.rr.com>
>From: "Chris Payne" <cjp@planetoxygene.com>
>To: <php-db@lists.php.net>
>Date: Fri, 29 Apr 2005 23:00:27 -0400
>MIME-Version: 1.0
>Content-Type: multipart/alternative;
>         boundary="----=_NextPart_000_0000_01C54D0F.3C23BB30"
>Subject: 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


 ========================================
================
CaptionKit http://www.captionkit.com : Production tools
for accessible subtitled internet media, transcripts
and searchable video. Supports Real Player, Quicktime
and Windows Media Player.

VideoChat with friends online, get Freshly Toasted every
day at http://www.fresh-toast.net : NetMeeting solutions
for a connected world.

Report this thread to moderator Post Follow-up to this message
Old Post
Neil Smith [MVP
04-30-05 01:55 PM


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:26 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.