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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Install/mod_rewrite - 500 Error


Reply


4 Posts   1419 Views

Avatar
Commucom

Community Member, 3 Posts

9 October 2010 at 9:54pm

Hey guys, i wonder if you can help!

I'm new to silverstripe and am having a few issues with uploading the site i've created to a fasthosts server.

I've created the site locally and all works well. When i transfer the entire site and change all the required credentials (passwords for mysql etc) to the fh server i get a 500 Error. Now i'm pretty sure this is to do with the .htaccess and more specifically the mod_rewrite module.

Whilst mod_rewrite doesn't show in phpinfo, i've used a test script to confirm it is active and have also contacted the hosting supplier, they also asure me that mod_rewrite is active.

I've also tried the route of installing a fresh distro of the latest silverstipe. The install states that mod_rewrite is not enabled and that the clean url's cannot be used. It allows me to finish installation and the front end site works. When i load up the backend admin area, no images show and non of the links show. I've attached the .htaccess file for this fresh install. To remove the 500 error on first upload to actually get to the install script i had to comment out one section shown in the below copy)

### SILVERSTRIPE START ###
<Files *.ss>
   Order deny,allow
   Deny from all
   Allow from localhost
</Files>

#<Files web.config>
#   Order deny,allow
#   Deny from all
#</Files>

ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html

<IfModule mod_alias.c>
   RedirectMatch 403 /silverstripe-cache(/|$)
</IfModule>

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

Can any of you guys shed any light, as to why this isnt working? Any other information required, please ask, i'll be more than happy to provide it, i just need this fixed.

Many thanks in advance, i really appreciate it!
Kind regards,

Commucom

Avatar
Willr

Forum Moderator, 5513 Posts

9 October 2010 at 10:49pm

Do you have access to the server error logs to see the actual error message?

Avatar
Commucom

Community Member, 3 Posts

9 October 2010 at 10:54pm

A mix of:

[alert] [client 86.24.25.243] /home/fhlinux131/d/david-auld.co.uk/user/htdocs/sapphire/.htaccess: deny not allowed here

&

[client 82.18.195.140] /home/fhlinux131/d/david-auld.co.uk/user/htdocs/.htaccess: order not allowed here

Avatar
Commucom

Community Member, 3 Posts

9 October 2010 at 10:59pm

If it helps, on the new install, looking at the admin html; it's calling the correct path for css and so on (ie. /index.php/.../... etc) but in the code the actual links to files and etc do not use this path, it is calling /.../.../... etc...