Recent Topics

1 Feb 18, 2007 21:57    

My b2evolution Version: 1.9.x

I've successfully installed b2evolution on a Linux box for testing, but now the boss wants to see it, and we have an account with Earthlink. The problem is that each PHP file on Earthlink must have the extension .php5.

Before I change every file name and then search-and-replace on the code to change every .php to .php5, does anyone know of a way -- perhaps through the .htaccess file -- of getting Earthlink to serve b2evolution's .php files as-is?

Thanks.

2 Feb 18, 2007 23:56

You should be able to do this with RewriteCond (check for the .php ending) and the rewrite the URL with RewriteRule (internally, so no [R] or absolute URL).

Just google for mod_rewrite and you should find it.

btw: you could also use PHP4 (normal .php ending?) for it. Or ask your host to set it up the other way round.

3 Feb 19, 2007 00:12

Thanks. I'll check mod_rewrite, but I usually don't understand the jargon very well, so I was hoping someone had a scrap of existing code.

As for asking Earthlink to set something up differently, apparently you've never dealt with Earthlink: They do what they do, period.

4 Feb 19, 2007 00:56

Well, I just tried both Addhandler and RewriteRule in my htaccess file, and neither seemed to work. I'm still open to suggestions.

5 Feb 19, 2007 01:06

It would have helped if you had posted your RewriteRule set.
E.g. have you used RewriteEngine On ?

6 Feb 19, 2007 01:19

Here's the first one I tried:

RewriteEngine on
RewriteBase /webdocs/cms/
# parse out basename, but remember the fact
RewriteRule ^(.*)\.php$ $1 [C,E=WasHTML:yes]
# rewrite to document.php5 if exists
# RewriteCond %{REQUEST_FILENAME}.php5 -f
RewriteRule ^(.*)$ $1.php5 [S=1]
# else reverse the previous basename cutout
# RewriteCond %{ENV:WasHTML} ^yes$
# RewriteRule ^(.*)$ $1.php

7 Feb 19, 2007 01:21

I also tried this:

AddType application/x-httpd.php5 .php
addhandler application/x-httpd.php5 .php

8 Feb 19, 2007 01:30

These don't work, either:

AddType application/x-httpd.php .php
addhandler application/x-httpd.php .php

AddType application/x-httpd.php .php5
addhandler application/x-httpd.php .php5


Form is loading...