[SOLVED] Friendly URLs are not working for me on v4.x install but do in v3.x

SS version 4.2.1

Hello, I’m trying to install SS v4.2.1 from scratch and the installer dies with:

Friendly URLs are not working. This is most likely because a rewrite module isn’t configured correctly on your site. You may need to get your web host or server administrator to do this for you:

* **mod_rewrite**  or other rewrite module is enabled on your web server
* **AllowOverride All**  is set for the directory where SilverStripe is installed

I’ve verified with my hosting service that mod_rewrite is enabled and AllowOverride All is set. I can prove it by uninstalling v4.x and installing v3.x. Everything works as it should with v3. Has something drastically changed in the way the installer detects these two settings? I read a post where the user edited an installer file and forced a return value to fake out the installer, but that did not seem to work for me.

Does anyone have any ideas where I should start looking to fix this?

Thanks in advance!

1 Like

A couple of questions:

How did you get the SS code? (composer, downloaded zip?)
Have you got your hosting configured to use the public directory as the web root?

I used composer to install both v4.x and 3.x versions. My web root is public_html and SS is installed inside of that directory. As an experiment I installed SS 4.x on my local WAMP server and it works flawlessly.

Can you tell us a bit more about the hosting platform you’re having trouble with?

What server it uses, webserver software, are you using the public directory structure, if so - have you set the document root to the right place, etc. ?

It is a shared hosting account on BlueHost.com. Yes, I’m using the public directory structure, but not sure how to check document root. AFAIK it’s the “public_html” that SS is installed in.

Apache Version: 2.4.34
PHP Version: 7.0.31
MySQL Version: 5.6.39-83.1
Architecture: x86_64
Operating System: linux

Might be something to look into. I thought that the line “RewriteRule ^(.*)$ public/$1” in the .htaccess file was supposed to redirect web access to the /public directory. Isn’t that how the initial install.php script gets run?

Maybe worth checking with them and seeing if it’s possible. In a default SS4 install with the public directory, you want to point the web root at that (so in your case it would be something like '/full/path/public_html/public' )

A post was split to a new topic: Issue with SS4 install on Mac

[SOLVED] Simply change the permissions on /public/index.php from 755 to 644. Everything works for me now!