FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » mod_rewrite rule question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: mod_rewrite rule question [message #173326 is a reply to message #173320] Sun, 03 April 2011 13:04 Go to previous message
Corvet is currently offline  Corvet
Messages: 4
Registered: April 2011
Karma:
Junior Member
"Luuk" wrote:

>>>>
>>>> thanks for input. I just find also, another method would be:
>>>>
>>>> RewriteRule ^(.*)\.(.htm|.html)$ $1.php [NC]
>>>>
>>>
>>> you do mean:
>>> RewriteRule ^(.*)\.(htm|html)$ $1.php [NC]
>>>
>>> ;)
>>>
>>> --
>>> Luuk
>> ----------
>>
>> yes, extra dots probably can be omitted.
>>
>>
>> Corvet
>
> no, the SHOULD be ommited
>
> see: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriterule
> <quoot>
> Some hints on the syntax of regular expressions:
>
> Text:
> . Any single character
> Escaping:
> \char escape the given char
> </quoot>
>
> Therefore:
> \.(.html) will match a dot followed by any character followed by 'html'
> \.(html) will match a dot followed by 'html'
>
>
-------

Thanks a lot. The regular expressions is something difficult :)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Posting and redirecting to remote script
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 00:27:14 GMT 2024

Total time taken to generate the page: 0.04927 seconds