If you're using an Apache Server, you can do this via a .htaccess file

Here's how you code it:

<Files page1>
    ForceType application/x-httpd-php
</Files>

Replace "page1" with the file name of your choice. Save page1 with all your PHP coding as a file with *no* file name extensions, as Apache will automatically add the PHP extension once your add in the "ForceType" function.

- Anthony

On 4/20/05, Chris Stratford <[EMAIL PROTECTED]> wrote:
Simply make this file in your root directory:

.htaccess

inside that include:

ReWriteEngine On

Then for every new link you want, add this:

ReWriteRule ^linktofile.html$ phpfile.php

That will point http://www.yoursite.com/linktofile.html -> phpfile.php

You can use REGEX in this, eg:

ReWriteRule ^linktofile_([0-9]+).html$ phpfile.php ?id=$1

That will link:
http://www.yoursite.com/linktofile_55.html -> phpfile.php?id=55
etc...

For more info, reply to me offlist :)


Mr Bean wrote:

>I'm still used to most of this web stuff and have
>spent most of my time with the design part of web
>design.  But the fact that I have to use a '.php'
>after in almost all my urls on my site really bugs me.
>
>Can anybody point me to a reference that can tell me
>how to config it so that 'http://abc.def/hij' can
>point to 'http://abc.def/hij.php '?  I'm using a 1.3.x
>Appache server.
>
>I would be really greatful if I could also learn how
>to rewrite 'http://abc.def/hij/klm/nop' as
>' http://abc.def/hij.php?klm=nop' but maby that's
>asking too much.
>
>______________________________________________________________________
>Post your free ad now! http://personals.yahoo.ca
>******************************************************
>The discussion list for  http://webstandardsgroup.org/
>
> See http://webstandardsgroup.org/mail/guidelines.cfm
> for some hints on posting to the list & getting help
>******************************************************
>
>
>
>
>
>

--
------------------------
Chris Stratford
[EMAIL PROTECTED]
http://www.neester.com
------------------------

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************


Reply via email to