I'm going insane!! I cant get friendly urls working. Ive tried editing the .htaccess file, php.ini, etc. This is my only issue. I have tried all the hacks? Nothing works. Does anyone have experience dealing with Network Solutions?
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.
SOLVED: mod_rewrite Issues
ISSUE: During installation the .htaccess file gets written to the "wrong" directory. It puts the .htaccess file in the SilverStripe-v directory after unpacking and doing a browser install. Remove the .htaccess file from the SilverStripe-v dir and place it in the root, problem solved. This is the correct code for .htaccess:
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</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>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###