Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 70775 invoked by uid 500); 27 Nov 2002 19:31:41 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 70739 invoked from network); 27 Nov 2002 19:31:40 -0000 Received: from venus.commerce.ubc.ca (137.82.154.16) by daedalus.apache.org with SMTP; 27 Nov 2002 19:31:40 -0000 Received: from exchange.commerce.ubc.ca (exchange.commerce.ubc.ca [137.82.66.44]) by venus.commerce.ubc.ca (8.9.3/8.9.3) with ESMTP id LAA23543; Wed, 27 Nov 2002 11:31:16 -0800 Received: from usager73-134.hec.ca ([132.211.73.134]) by exchange.commerce.ubc.ca with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2656.59) id W4TZKHSS; Wed, 27 Nov 2002 11:31:19 -0800 Date: Wed, 27 Nov 2002 14:31:08 -0500 (Est) From: Joshua Slive To: users@httpd.apache.org, Remo Mattei In-Reply-To: Message-ID: References: X-X-Sender: slive@exchange.commerce.ubc.ca MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] Html to php On Wed, 27 Nov 2002, Remo Mattei wrote: > Hi guys I am updating a site that has links on search engines that are > really high in ranking but they are in .html and I want to have the new one > in .php is there a way that I can do that with some reg expr. With mod > rewrite mod, I am not sure but any suggestions are appreciated. Of course I > would like to have the ability to still use some .html extentions. Thanks, Apache is very flexible with urls, so there are tons of different ways to do this. Perhaps the simplest is to just have php parse ALL your .html files (AddType application/x-php-whatever .html). The disadvantage is that it will unnecessarily slow the delivery of plain html. Probably the best way to do it is to use that same AddType directive, but scope it inside and sections to make sure that it only applies to the files you want. You can use the regular .php extensions for your php files and have apache remap the url. To do this individually for each file, you would use something like Alias /path/to/file.html /full/unix/path/to/file.php There are various ways of doing a bunch of files at a time, but it all depends on how you can tell the difference between your true html files and your php files. Finally, you can use either an ErrorDocument or a RewriteRule to catch all failing requests for .html files and see if there is a similar .php file that can be served. This can be slow for lots of requests, however. I'm sure there are other ways. If you want more specific help, you'll need to more specifically outline your needs. Joshua. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org