|
Posted by BootNic on 11/12/07 20:38
"Jonathan N. Little" <lws4art@centralva.net> wrote:
news:ac5e$47388945$40cba7a5$14401@NAXS.COM:
> BootNic wrote:
>> "Jonathan N. Little" <lws4art@centralva.net> wrote:
>> news:a9063$4738827b $40cba7a5$12517@NAXS.COM:
>>
>>> BootNic wrote:
>>>
>>>> You could try to use RedirectMatch in your .htaccess:
>>>>
>>>> RedirectMatch 301 (?i)^(.*)\.html(.*)$ $1.php$2
>>>> What is this part? ^^^^
>>
>> (?i) is case-insensitive matching
>>
> Ah! Unfamiliar with that one. But what good would case-insensitive
> matching do when you are passing the basename through? Somefile.php
> SomeFile.php, and SOMEFILE.php won't works if the file name is
> somefile.php
The only thing it was redirecting was based on .html. So it would redirect
(SomeFile.html|SomeFile.HTML|SomeFile.hTmL) to SomeFile.php, and
(somefile.html|somefile.HTML|somefile.hTmL) to somefile.php
So a URL:http://example.com/index.HTML?a=apple
would redirect to http://example.com/index.php?a=apple
(http://example.com/index) = $1
(?a=apple) = $2
Without the case-insensitive matching the above URL would not be redirected
and so you would get http://example.com/index.HTML?a=apple
I suppose a good question would be is the redirect going to redirect to
(php|PHP).
> I would think case-insensitive matching would be useful is you are not
> parsing the name
>
> RedirectMatch 301 (?i)^THISFILE.HTML$ thatfile.php
The RedirectMatch is not intended to do error correction for case in the
filename or path, at least in my example, that's another subject.
--
BootNic Monday November 12, 2007 3:38 PM
"This is all very interesting, and I daresay you already see me
frothing at the mouth in a fit; but no, I am not; I am just winking
happy thoughts into a little tiddle cup."
*Nabokov, Lolita*
Navigation:
[Reply to this message]
|