Rewriterules not working with custom php cgi/ini


#1

hey, i followed

http://wiki.dreamhost.com/index.php/PHP.ini

and have everything working perfect except for url rewriting.

i can assure you everything is how it needs to be… except for the .htaccess in the domain folder where i’ve tailed “RewriteEngine On” and “RewriteRule .* index.php” to the end of it.

commenting out the RewriteRule makes everything work perfectly as it is supposed to… uncommenting breaks it and gives me an internal server error.

I tried adding +FollowSymLinks and even +All to both .htaccess files Options but still nothing…

if someone could tell me where my error.log is located that may help and hopefully advise me of the issue that be greatly appreciated

thanks in advance!


#2

Anyone? ;\


#3

While you may have a syntax error in mod_rewrite rules, this has nothing to do with PHP. PHP and Apache configuration via .htaccess are are entirely unrelated.

But, as you’ve guessed, your error log will tell you what the problem is. It’s located at:

/home/username/logs/example.org/http/error.log


If you want useful replies, ask smart questions.


#4

kchrist, if you weren’t so full of yourself you would realize

a.) i wasn’t relating php and apache in anyway… i’ll give you this much it may of been a bit confusing for you.

b.) i didn’t guess a single thing in the entire post

and lastly c.) your sig, it would be less ironic if you would proof read your posts

anyway in my .htaccess i have this(nothings wrong)…

This file is regenerated. Your changes will not be saved!!!

Options ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php5.cgi
RewriteEngine On
RewriteRule .* index.php

but thanks for the error log!!
it told me i am exceeding more then the max internal redirects… which leads me to cgi-bin/.htaccess not having “RewriteEngine off” in it, after putting it in the error is nomore.


#5

Hey, slow down cowboy. In case you hadn’t noticed, I was trying to help. No good deed goes unpunished, I suppose.

Anyway, your subject line says “rewriterules not working with custom php cgi/ini”, which is about four words too long. There seems to be a lot of confusion around here as to the exact relationship between PHP and Apache directives (including, but not limited to, mod_rewrite), so I wanted to clear that up first.

You guessed that the answer would lie in your error log, which puts you ahead of the game as far as most new posters here go, so that was actually a compliment. But you can read that line as “as you know” instead of “as you’ve guessed” if it makes you feel better.

Finally, with the exception of the part where you asked about the location of the error log, your post wasn’t very clearly written. Perhaps you could benefit from learning to ask better questions. Perhaps you should also try not to insult people who are trying to help you with your configuration problems.


If you want useful replies, ask smart questions.


#6

Nice! Obviously, he should have ignored your “bump”, as did most of us when you include “i can assure you everything is how it needs to be” in your original post. Talk about being “full of yourself”! :wink:

You asked where the error logs were, he told you. Obviously, he gave you more than you deserved. Since you managed to find the wiki, and know enough to “assure us everything is how it needs to be”, one would think you could have figured out how to type “error logs” into the search input box on the wiki, but maybe not.

–rlparker


#7

i appologize for that kchrist, it may of been confusing the issue i was refering to occured after i installed the custom cgi/ini using the wiki and you’re right they aren’t related but it was just a way of stating the situation as best as i could(all nighters and issues left and right will bring out the beast in most of us especially over the simple things).

BTW. when i said i can assure you… i should of added It wasn’t my code nor the wiki’s code causing the problem which kinda took me straight to the apache site looking for an answer i had right in front of me… “RewriteRule .* index.php” actually works fine using the zend framework (only .php needed).

I understand again i appologize, shouldn’t of replied that way and i don’t deserve to post ever again. :frowning: