Current time: 11-26-2024, 05:36 AM Hello There, Guest! (LoginRegister)


Post Reply 
[solved] having a .htaccess file causes server (500) errors...
Author Message
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #1
[solved] having a .htaccess file causes server (500) errors...
I remember having this issue with vhcs2 and now i've run into it with ispcp, i hope there's a solution, or that i'm just making a dumb mistake that i can fix easely!

the problem is that i need to be able to rewrite urls using mod-rewrite. Now as soon as i have a .htaccess file in my htdocs folder i get "Error 500! - Internal Server Error!" errors.

Here is most of my .htaccess file:

Quote:RewriteEngine on
Options +FollowSymLinks


ErrorDocument 400 /error.php?400
ErrorDocument 401 /error.php?401
ErrorDocument 403 /error.php?403
ErrorDocument 404 /error.php?404
ErrorDocument 500 /error.php?500


#assign custompage to site index
DirectoryIndex news.php
DirectoryIndex index.php
DirectoryIndex index.html
DirectoryIndex index.htm

#Fix for the page redirect na Login
#RewriteRule ^page.php$ / [R]

#Fix For the CustomLogin in The Header
RewriteRule ^gallery/index.php(\?logout) /index.php?%1 [L]
RewriteRule ^gallerysitemap.xml http://www.psygarden.net/gallery/index.p...ap.Sitemap [L]

RewriteRule ^gallery/v/([^?]+)(\?.|\ .) /e107_plugins/gallery2/gallery2.php?g2_path=%1 [QSA,L]

RewriteRule ^gallery/$ /e107_plugins/gallery2/gallery2.php$1 [L]
RewriteRule ^gallery$ /e107_plugins/gallery2/gallery2.php$1 [L]
RewriteRule ^gallery/index.php(.*) /e107_plugins/gallery2/gallery2.php$1 [L]


RewriteRule ^gallery/signup.php /signup.php [L]
RewriteRule ^gallery/e107_admin/admin.php /e107_admin/admin.php [L]
RewriteRule ^gallery/user.php(.*) /user.php%1 [L]
RewriteRule ^gallery/usersettings.php /usersettings.php [L]

# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On

RewriteBase /g2/

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_URI} !/gallery2/main\.php$
RewriteRule . - [L]

RewriteCond %{THE_REQUEST} /gallery/popular(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /e107_plugins/gallery2/gallery2.php?g2_view=dynamicalbum.PopularAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/updates(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /e107_plugins/gallery2/gallery2.php?g2_view=dynamicalbum.UpdatesAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/random(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /e107_plugins/gallery2/gallery2.php?g2_view=dynamicalbum.RandomAlbum [QSA,L]
RewriteCond %{THE_REQUEST} /gallery/d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /e107_plugins/gallery2/gallery2.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_file$
RewriteCond %{THE_REQUEST} /gallery/v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/gallery/main\.php$
RewriteRule . /e107_plugins/gallery2/gallery2.php?g2_path=%1 [QSA,L]
</IfModule>

Does anyone have suggestions how to get a working setup while using all these rewrite rules?

Kind regards,
Rik
(This post was last modified: 01-25-2008 08:49 AM by psygarden.)
01-24-2008 02:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #2
RE: having a .htaccess file causes server (500) errors...
Did you checked your /etc/apache2/sites-enabled/ispcp.conf about
Code:
Options -Indexes Includes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
If you deny here the FollowSymLinks you can not enable it in your .htaccess. Next is that FastCGI can not understand ALL values in the .htaccess.

Please check your error.log for more info!

Greez BeNe
01-24-2008 02:54 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #3
RE: having a .htaccess file causes server (500) errors...
BeNe Wrote:Did you checked your /etc/apache2/sites-enabled/ispcp.conf about
Code:
Options -Indexes Includes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
If you deny here the FollowSymLinks you can not enable it in your .htaccess. Next is that FastCGI can not understand ALL values in the .htaccess.

Please check your error.log for more info!

Greez BeNe

Those settings are correct for that config file, is there any way that i can disable FastCGI after a website has been created ? mod rewrite is very important for all my sites...
01-24-2008 04:21 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #4
RE: having a .htaccess file causes server (500) errors...
Quote:is there any way that i can disable FastCGI after a website has been created ?
You can try to change to mod_fcgid...but i dont konw if this is a solution for your Problem.
Try to set it directly in the apache2 config for the vhost.
Not that nice way but it should work there.

Greez BeNe
01-24-2008 04:26 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: having a .htaccess file causes server (500) errors...
You also could try to find out, which line is throwing the error.
Normally you also have some infos in the error.log of apache...
01-24-2008 04:32 AM
Visit this user's website Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #6
RE: having a .htaccess file causes server (500) errors...
Quote:Next is that FastCGI can not understand ALL values in the .htaccess.
ugh? fastcgi doesn't parse the .htaccess files, apache does
01-24-2008 05:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #7
RE: having a .htaccess file causes server (500) errors...
Quote:ugh? fastcgi doesn't parse the .htaccess files, apache does
*damn* Ok - this was my fault i was thinking at htscanner but this only for php values Rolleyes. And these directive is for mod_rewrite and has nothing do to PHP. Sorry!

Greez BeNe
01-24-2008 05:43 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #8
RE: having a .htaccess file causes server (500) errors...
Resolved Wink
01-25-2008 07:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #9
RE: having a .htaccess file causes server (500) errors...
Does it work now ?
What was the Problem ?

Greez BeNe
01-25-2008 08:18 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #10
RE: having a .htaccess file causes server (500) errors...
BeNe Wrote:Does it work now ?
What was the Problem ?

Greez BeNe

I can't use the following statements in the default debian setup:

Quote:Documentroot someting.html
Options +FollowSymlinks
ErrorDocument 400 /error.php?400
ErrorDocument 401 /error.php?401
ErrorDocument 403 /error.php?403
ErrorDocument 404 /error.php?404
ErrorDocument 500 /error.php?500

If i remove those lines that all the rest seems to be working!
01-25-2008 08:23 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)