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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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


Go to End

9 Posts   4322 Views


Community Member, 9 Posts

11 November 2009 at 4:40am

I have a problem with the htaccess file conflicting with other folder within my site. My hosting allows multiple domains to be registered and pointed to subfolders within the main htdocs.

For example >> htdocs >> htdocs/folder

and so on. What is happening is that after installtion the htaccess file is screwing with all the secondary domains and causing server 500 errors. is there a way that I can alter the htaccess file to exclude certain folders...

Heres hoping



Community Member, 9 Posts

11 November 2009 at 5:21am

Oop's never mind I have found the answer by searching correctly this time.
Just uploaded a htaccess file to each sub folder I dont want re-written and its all cool.

Thanks very much


Community Member, 323 Posts

11 November 2009 at 6:32am

Hi Chris!

I’m moving my sites to a server similar to the one you describe and I’m concerned about this subdomain thing. Could you please post the content of those .htaccess files? I’ve read that in some cases they have just to be there, even blank.



Community Member, 203 Posts

11 November 2009 at 7:46am

Add this to your .htacces rules:

RewriteCond %{REQUEST_URI} !^/dirname/.*

Where dirname is the name of the folder you want to be able to access without silverstripe interfering with that.

But I think you do not need that, because the .htacces will only interfere if you are accessing, not if you acces, even though it is in a subfolder of yourmaindomain.


Community Member, 323 Posts

11 November 2009 at 10:29am

Thank you, it’s very kind of you. I’ll test it when I change the hosting.

Best regards,


Community Member, 904 Posts

11 November 2009 at 9:49pm

This has been asked several times already.
The simplest solution (in my opinion) is to put an .htaccess into the subdomain folder (since that .htaccess file will take precedence over the one in the root folder). There you would typically turn rewriting off, or define your own rewrite rules for the subdomain. To disable rewriting, put the following in your .htaccess (for the subdomain)

<IfModule mod_rewrite.c>
RewriteEngine Off


Community Member, 1 Post

25 March 2010 at 3:27am


Thanks for that tip, just the solution I was looking for!


Community Member, 11 Posts

28 September 2010 at 7:54pm

I am having a problem with rewriting urls.

I want
to be redirected to

The prob is that "?u=788" remains in the url ie it looks like this

I want to have "?u=788" removed.

I tried
RewriteCond %{QUERY_STRING} .
RewriteRule ^(.*)$ /$1? [R=301,L]

but it redirects to

I tried
RewriteCond %{QUERY_STRING} .
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI}/$1? [R=301,L]

but it still redirects to

I tried

RewriteCond %{QUERY_STRING} .
RewriteRule ^(.*)$$1? [R=301,L]

It worked but I don't want to explicitly indicate the domain name since I'll be testing it on a dev test server and then to a staging server which means the domain names would vary.

Any ideas how to solve this?

Thanks in advance!

Go to Top