Forum Moderators: phranque
Pages are static HTML, but in order to get some PHP code working inside those HTMLs, we did this:
AddType application/x-httpd-php .php .htm .html
So far so good.
Then, since we parse HTML with some Perl based parser, I had to do this to get it work:
RewriteRule ^(.*)\.html$ parser.cgi?file=$1 [QSA,L] - old code for HTML files
RewriteRule ^(.*)\.php$ parser.cgi?file=$1 [QSA,L] - new code for PHP files
I wonder if this can be done in one line. How do we get this if we have multiple file extensions that we want to rewrite?
Thanks
The time was long time ago. I'm late while pushed (by business) to seek advice in this way.
Those are almost at my door:
1. CGI Programming with Perl
2. Perl Cookbook
3. Php Cookbook
4. Regular Expression Pocket Reference
I already have some but they don't bother about such stuff (regular expression).
For sure, I did not order anything about Apache, for the sake of getting my .htaccess right.
Any suggestion?
Thanks again.
P.S.
I have bookmarked the charter from the forum. I know... you'll say "read it". I will. :)