RewriteEngine issues

8 views
Skip to first unread message

nathanbeach.com

unread,
May 21, 2008, 6:29:50 PM5/21/08
to PHP Personal Budget
Hi:

This looks like a great piece of software. I'm trying to run it on my
own subdomain and am having some problems with what seems to be
the .htaccess rewrite. I copied and pasted exactly the <IfModule>
stuff from the INSTALL text file, and I'm able to see the home page
just fine:
http://budget.surprises.org/

However, if I click on the month, I get an Internal Server Error. It
looks like some kind of weird circular path is showing up in the
Apache log:
63.97.40.150 - - [21/May/2008:18:18:12 -0400] "GET /kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/kunden/homepages/5/
d133761864/htdocs/surprises/budget/index.php/budget/month/200805 HTTP/
1.1" 200 645 budget.surprises.org "http://budget.surprises.org/"
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/
20080404 Firefox/2.0.0.14" "-"

My hosting is through a 1and1.com Developer package. This is the
phpinfo for the domain:
http://www.surprises.org/test.php5

Any help would be appreciated. I think this piece of software is
exactly what I need. Thanks!

Nathan Beach

Dan R. Olsen III

unread,
May 21, 2008, 11:36:55 PM5/21/08
to php-perso...@googlegroups.com
Is your install of PHP Budget pointing to the domain base directory or is it in a sub directory of the main domain directory?

nathanbeach.com

unread,
May 22, 2008, 6:46:07 PM5/22/08
to PHP Personal Budget
On May 21, 10:36 pm, "Dan R. Olsen III" <danec...@gmail.com> wrote:
> Is your install of PHP Budget pointing to the domain base directory or
> is it in a sub directory of the main domain directory?

http://www.surprises.org/ points to:
/htdocs/surprises/

http://budget.surprises.org/ points to:
/htdocs/surprises/budget
...and that is where php budget was installed.

Should I try in the root of a domain? (not a subdomain)?

Thanks for your help...

Nathan

Dan R. Olsen III

unread,
May 23, 2008, 9:09:20 AM5/23/08
to php-perso...@googlegroups.com
Well, I have it installed on a subdomain and it is working. Did you add the .htaccess file?

nathanbeach.com

unread,
May 23, 2008, 10:44:01 AM5/23/08
to PHP Personal Budget
On May 23, 8:09 am, "Dan R. Olsen III" <danec...@gmail.com> wrote:
> Well, I have it installed on a subdomain and it is working. Did you add
> the .htaccess file?

Yes, here are the contents of the .htaccess file:

AddType x-mapp-php5 .php

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

The AddType is required because my server defaults to php4 by default
for the .php extension.

Thanks,
Nathan Beach

nathanbeach.com

unread,
May 23, 2008, 11:06:51 AM5/23/08
to PHP Personal Budget

Hi:

I just went through the Apache-related FAQs at 1and1.com and saw an
example of them adding "RewriteBase /" to the Rewrite rule. Now it
seems to work for me with the following .htaccess file:

AddType x-mapp-php5 .php

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

You might keep this in mind if you have other 1and1 users with sharing
hosting ...hope this helps someone else. (and thanks for your help!)

Nathan Beach

Dan R. Olsen III

unread,
May 23, 2008, 11:14:15 AM5/23/08
to php-perso...@googlegroups.com
I'm glad you got it figured out.
Reply all
Reply to author
Forward
0 new messages