httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Barrera A." <Br...@Ivn.cl>
Subject Re: [users@httpd] Processing PHP with HTM Pages
Date Tue, 22 Feb 2005 16:14:11 GMT
Using rewrite for such a simple problem, is adding another problem.

Use mod_spelling, it is bundled in most installations, and makes a file 
with mixed case, works fine.


Boysenberry Payne wrote:
> You might be able to use mod_rewrite to do this...
> It's a standard apache module.  You could use
> .htaccess files to rewrite urls that need to be both cases.
> 
> 
> RewriteEngine on
> RewriteRule   [Cc]apitalized.htm     Capitalized.htm
> 
> You can get a lot more sophisticated with how you rewrite
> the url.  Check out Mastering Regular Expressions by O' Reilly
> and the apache docs on mod_rewrite for more info.
> 
> My other suggestion is doing a find and replace in your
> html file, just replacing the upper case links with lower case 
> alternatives.
> If you have a version of egrep handy this is easy...
> 
> Boysenberry
> 
> 
> On Feb 22, 2005, at 5:36 AM, David Blomstrom wrote:
> 
>> I just discovered a reference that says to paste the
>> following into the .htaccess file:
>>
>> addtype application/x-httpd-php .html
>> AddHandler x-httpd-php .html
>>
>> I did so, then insert the following PHP include link
>> in a page with a .htm extension:
>>
>> <?php include
>> ($_SERVER['DOCUMENT_ROOT']."/includes/footer.php"); ?>
>>
>> Then I restarted my computer and previewed the page.
>> Instead of getting an error message (footer.php
>> doesn't exist), I saw nothing. However, I can see the
>> entire script when I view the page source.
>>
>> Does anyone have any suggestions? Thanks.
>>
>> --- David Blomstrom <david_blomstrom@yahoo.com> wrote:
>>
>>> Some time ago, I wrecked my Microshaft
>>> FrontPage-constructed website when I moved it from a
>>> Microsoft to a Linux server. Some of the folder/page
>>> names and hyperlinks included capital letters, and I
>>> didn't realize everything has to be lowercase on
>>> Linux
>>> servers.
>>>
>>> However, I've been told that there is a way to
>>> process
>>> PHP on pages with .htm extensions, and I think it
>>> involves Apache. Can someone tell me how to do this?
>>> Can you refer me to a tutorial?
>>>
>>> Also, if I can accomplish this, is there also a way
>>> to
>>> modify a site with Apache (or some PHP script) so
>>> that
>>> capital letters are translated as lowercase? For
>>> example, imagine the following links and targets:
>>>
>>> www.mysite.com/Horses >>> Horses/index.htm
>>> www.mysite.com/deer >>> mammals/Deer.htm
>>> www.mysite.com/Mammals/deer >>> mammals/deer.htm
>>>
>>> I'd like to somehow rig it so that all of these
>>> links
>>> would be transformed into lowercase, and all the
>>> pages
>>> they link to would display, preferably with
>>> lowercase
>>> letters in the browser window.
>>>
>>> I'm reluctant to rename any of my folders or pages,
>>> as
>>> I fear that might mess up things with the search
>>> engines that have spidered my site. Besides, I don't
>>> want to put too much time into this site, as I'm
>>> downsizing it, slowly replacing it with a series of
>>> new websites. But I'd like try to make the remaining
>>> site function until I'm ready to officially close
>>> it.
>>>
>>> Thanks.
>>>
>>>
>>>
>>>        
>>> __________________________________
>>> Do you Yahoo!?
>>> Yahoo! Mail - 250MB free storage. Do more. Manage
>>> less.
>>> http://info.mail.yahoo.com/mail_250
>>>
>>>
>> ---------------------------------------------------------------------
>>
>>> The official User-To-User support forum of the
>>> Apache HTTP Server Project.
>>> See <URL:http://httpd.apache.org/userslist.html> 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
>>>
>>>
>>
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server 
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> 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
>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> 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
> 
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message