Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

application/x-httpd-php?


Go to End


3 Posts   2056 Views

Avatar
jseth

Community Member, 98 Posts

21 May 2010 at 3:36am

My network admin is trying to set up virtual hosts for our websites that we host here. The index.php files in my SilverStripe site folders aren't parsing correctly. Through searching, I did find that adding the following:

AddType application/x-httpd-php .php .htm .html

was supposed to correct the issue. However, one source said to add it to the .htaccess file - I tried adding it to the .htaccess file in each SilverStripe site folder, but that didn't work. Another source (a post on this site) said to add it to the vhosts.conf file, but that gives me an internal server error. We're restarting apache after each change. The virtual host config works fine for the website that has an index.html, so I'm sure that this is the issue, just not sure what's not quite right. Can anyone shed some light on this for me? Thank you.

Avatar
jseth

Community Member, 98 Posts

22 May 2010 at 3:40am

Really, no one has any help for this question? In my error log I get "Request exceeded the limit of 10 internal redirects due to a probable configuration error. User 'LimitInternalRecursion' due to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace."

From what I can gather, this is a problem with the rewrite in the .htaccess files. When I remove the .htaccess file from the site directory, the page displays with no formatting. When I put the file back, it give me a 500 Internal Server Error - The server encountered an internal error or misconfiguration and was unable to complete your request., which gives the error in the log file.

It should not be this difficult to get virtual hosting to work. Can anyone help me please!!!!

Avatar
nichess

Community Member, 3 Posts

27 January 2011 at 12:32pm

Looking for a solution too.

I found on this site:
http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html#m0-askapache14

there is a rewrite rule to fix infinite loops:

RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]

But I don't know where to put it, in this part of the .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>