Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

.htaccess File and SS Admin


3 Posts   1330 Views

Yellow7 Jon

30 April 2010 at 12:01pm Community Member, 39 Posts

Alright, I know its kind of a weird thing to do, but...

I developed a site in a sub folder, and instead of moving all of the files into the root folder, we have set up the .htaccess file to hide the sub folder...


now the site works as it should and what not, until I goto /admin and get redirected to I enter the admin details, and get redirected back to the login screen. For some reason I can NOT get into the admin...

heres my htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /new_site/
RewriteRule index\.htm [r=301,L,NC]

#Direct to Silverstripe
RewriteCond %{REQUEST_URI} ^(.*)$
#RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_URI} !/(themes|assets|jsparty|blog|pdf|images)
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L,NC]

#Do not direct to Silverstripe
RewriteCond %{REQUEST_URI} /(themes|assets|jsparty|blog|sapphire)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) $1 [L,NC]


any help would be greatly appreciated.


30 April 2010 at 2:16pm Community Member, 133 Posts

After entering the admin details, and getting redirected back to the login screen, if you then go to /admin do you get into the admin section?

I'm curious, why do you want to keep the site in the subfolder?


Yellow7 Jon

30 April 2010 at 5:14pm Community Member, 39 Posts

We're keeping it in the sub folder to allow both the old files and new site to be accessed.

and nope, cant get to the admin section at all, and when I hack away at the htaccess file enough, and get to the "admin" section I get an error saying its not a valid authenticator or something...