silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
721 stars 821 forks source link

3.1.14 brakes entire site #4614

Closed sunnysideup closed 9 years ago

sunnysideup commented 9 years ago

Hi,

I just switched from 3.1.3 to 3.1.4 and the whole site stopped working. Basically, I can not get past the home page. Any other link I click on I just see the home page, although the URL changes.

It most likely stems from this change:

https://github.com/silverstripe/silverstripe-framework/commit/71a14c30352e69e4c0ac59e5ea72e1da0c79009b

I can reproduce on two servers (local, and actual webservers, both running Ubuntu 14.04).

I dont use .htaccess, but instead I have the following in my sites-enable apache folder:


<VirtualHost *:80>

        ServerName localhost
        ServerAlias localhost *.localhost
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        VirtualDocumentRoot /var/www/%-2+/

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>

        <Directory /var/www >
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
                RewriteEngine On
                RewriteBase /

                SetEnv HTTP_MOD_REWRITE On
                RewriteEngine On

                RewriteCond %{REQUEST_URI} ^(.*)/sapphire/main.php$
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteRule .* framework/main.php?url=%1 [QSA]

        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        # LogLevel error
        LogLevel debug
</VirtualHost>
tractorcow commented 9 years ago

What php version are you using?

tractorcow commented 9 years ago

What if you change the REQUEST_URI to RewriteCond %{REQUEST_URI} ^(.*)$ as in the default installer?

sunnysideup commented 9 years ago

great - solved... THANK YOU...

I actually had a bit more tricky rewrite conditions : go to sapphire if it exists, otherwise user framework/main.php .... I removed sapphire/main.php as we dont have any 2.4 sites anymore ;-)

Thank you for your help

tractorcow commented 9 years ago

Awesome. :D