Reply to Re: PHP include and changing page names

Your name:

Reply:


Posted by Ed Mullen on 11/13/07 20:11

BootNic wrote:
> Ed Mullen <ed@edmullen.net> wrote:
> news:e7-dnTeEvLNua6ranZ2dnUVZ_v6rnZ2d@comcast.com:
>
>> Ed Mullen wrote:
>>> Jonathan N. Little wrote:
> [snip]
>>>> Very simple example...
>>>> .htaccess file
>>>>
>>>> RewriteEngine On
>>>>
>>>> RewriteRule ^(.*)\.html$ $1.php
>>>>
>>> Excellent. Thank you all. I do have the ability to edit the
>>> .htaccess file. I will go read more so as not to be quite as
>>> dangerous as I am now.
>>>
>> Well, that was interesting.
>>
>> Using the above RewriteRule I did a test. And the only way it works
>> is if I rename the calling .html file to .shtml. Which, obviously,
>> defeats the purpose.
>>
>> Is this something that can configured/over-ridden using the .htaccess
>> file? Or is it at the server configuration level (which I do not have
>> access to)?
>
> You could try to use RedirectMatch in your .htaccess:
>
> RedirectMatch 301 (?i)^(.*)\.html(.*)$ $1.php$2
>

Ok, that seems to be doing the trick! Thanks!

Now, how do I turn that off for a given folder on the Web server? Is
that possible? What would I put in the folder's .htaccess files?

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
A bartender is just a pharmacist with a limited inventory.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация