[nycphp-talk] Related to "How to create custom URLs"
Mark Armendariz
lists at enobrev.com
Mon Mar 19 19:27:12 EDT 2007
On 3/19/07, Rob Marscher <rmarscher at beaffinitive.com> wrote:
> On Mar 19, 2007, at 12:28 PM, tedd wrote:
> > [1] http://sperling.com/contact
> > instead of the new:
> > [2] http://sperling.com/contact.php
> > How can I get the url displayed to look like number [1] regardless
> > if the user adds ".php" or not?
>
> I was messing around with it and it seems the only way to get it to
> work without causing a circular redirect is to put your php code in a
> file named contact (without the .php) and get apache to process that
> with php --
i suppose a simpler answer, though possibly not the one you want,
might be to rename contact.php to something like contacts.php or
contactpage.php
so your redirect will point contact.php -> /contact/
and your rewrite will point /contact/ -> contactpage.php
Mark
More information about the talk
mailing list