Hi Marcus,
thanks, your code didn't work for me. But trying your hints I have finally found a configuration that works 100% in my setup, including the admin area. SS 2.4.0, apache, php 5.1.2 Ingredients:
- 2 .htaccess files, one in webroot and one in the "silverstripe" subdir.
- 2 entries in _config.php.
My SS subdir is called "silverstripe", please exchange that with the name of your subdir:
######## .htaccess webroot: ############
### SILVERSTRIPE START ###
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /silverstripe/
RewriteCond %{REQUEST_URI} !^/silverstripe/
RewriteRule ^(.*)$ /silverstripe/$1
</IfModule>
### SILVERSTRIPE END ###
############### .htaccess silverstripe subdir: ##############
### 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>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###
################### _config.php: #######################
...
SiteTree::enable_nested_urls();
Director::setBaseURL("/");
...
Please give it a try and let me know if it works for you.
Regards, vr