Apache 2.4 mod_rewrite issues (on GoDaddy)

1,563 views
Skip to first unread message

Martimiz

unread,
Jun 11, 2013, 6:00:01 AM6/11/13
to silverst...@googlegroups.com
Hi,

It looks like something went wrong with a series of SilverStripe installs (2.4?) and mod_rewrite on goDaddy after a recent upgrade to Apache 2.4. Please read these forum posts:

http://www.silverstripe.org/general-questions/show/23917?start=16

A GoDaddy representative came up with a solution, by changing some code in main.php, and although I salute them for their efforts, I think this might possibly not be the right approach. I usually work with Lighttpd, so I'm not that into htaccess, but I think changes should be made there? Is this a general Apache 2.4 problem (so it might start effecting others too)? Can anyone possibly shine some light on this?

Just thought to mention :)

Martine

g4b0

unread,
Aug 30, 2013, 5:25:01 AM8/30/13
to silverst...@googlegroups.com
I just upgraded to apache 2.4 and I'm having a similar issue: It seems that actual .htaccess is not working anymore, rewrite works fine for everything but the homepage, that is processed through index.php.

Does anybody have a working solution to this issue?

g4b0

Lamin Barrow

unread,
Aug 30, 2013, 11:05:13 AM8/30/13
to silverst...@googlegroups.com
I got a similar issues recently for a client site. 

Anyways, delete or rename the index.php from your website root and see if it works.

g4b0

unread,
Sep 2, 2013, 3:11:06 AM9/2/13
to silverst...@googlegroups.com
It works fine, but it's a workaround. I think it will be better to find a .htaccess solution, isn't it?

g4b0

Giulio Bonanome

unread,
Nov 8, 2013, 6:11:30 AM11/8/13
to silverst...@googlegroups.com
Hi,

I've update my machine (Ubuntu 13.10) and found this Apache 2.4 issue. 
Anyone came up with a different solution? Is removing index.php the only workaround?

Thanks in advance for any help.
Giulio

Daniel Hensby

unread,
Nov 8, 2013, 6:29:58 AM11/8/13
to silverst...@googlegroups.com
Really the index.php file is there just to provide a fallback for environments without rewrite support, so deleting the file isn't really a terrible thing to do as it should never be used if mod_rewrite is on.

I'm sure it would be possible to write a conditional in the mod_rewrite for empty URL to be handled by framework/main.php

Zauberfisch

unread,
Nov 8, 2013, 7:04:05 AM11/8/13
to silverst...@googlegroups.com
this sounds like the perfect opportunity to do some refactoring on main.php and finally replace $_GET['URL']
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-d...@googlegroups.com.
To post to this group, send email to silverst...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Giulio Bonanome

unread,
Nov 8, 2013, 8:56:00 AM11/8/13
to silverst...@googlegroups.com
Thanks for the answers (and +1 for refactoring).

After finding the correct documentation: http://httpd.apache.org/docs/2.4/mod/mod_dir.html#directoryindex I've found a new option for Apache: DirectoryIndex disabled
I've used it in my userdir module that now look like this

<Directory /home/*/public_html>
         AllowOverride All
         DirectoryIndex disabled
         Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec                
</Directory>

Also I must use "AllowOverride All" because Apache 2.4 has "None" set by default. Finally I can leave that index.php where it is, but the system work like before.

Cheers,
Giulio

Cam Findlay

unread,
May 8, 2014, 8:27:40 PM5/8/14
to silverst...@googlegroups.com
I have found on the forums getting SS to work under Apache 2.4 raises this issue. I think I have answered a heap of posts pointing to the example here on the dev list.


What can be done to imporve this, is there something in SS core that can be altered to negate this issue or is it always going to be about the user setting up there apache rewriting as mentioned here?
Reply all
Reply to author
Forward
0 new messages