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.

Archive /

Our old forums are still available as a read-only archive.

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

.htaccess problem

Go to End

16 Posts   35341 Views


12 Posts

18 September 2007 at 11:11pm

Hi Trevor,

I do have WHM with my package, but it seems such a shame to have an entire cPanel account just for a 2mb website that uses a subdomain off the main one :(


53 Posts

18 September 2007 at 11:20pm

I think that the cpanel is generic across all accounts unless you have to pay extra for each one in which case I agree with you.

The cpanel account for each one does at least enable you to keep things seperate, as if you end up maintaining lots more sites (as hopefully you will) by just having the seperate directories there is a risk that you may transfer something in to the wrong one by mistake, if you have seperate cpanel and ftp etc then you are able to keep things apart.

By the way where are you based I'm in the UK.



12 Posts

18 September 2007 at 11:22pm

I unfortunately have an account limit, and whilist I haven't reached that as of yet, I'd hate to waste them unnecessarily.

I'm in Australia.


Community Member, 23 Posts

6 February 2008 at 8:56am

I know that this is an old thread. I was having the same problem today. What has worked for me is putting 'RewriteEngine off' in the .htaccess file in the directory for my subdomain. My configuration uses a subdirectory under the public_html directory in a cpanel environment.

This only works if what you want to put in the subdomain does not need to interact with your SilverStripe site at all beyond linking to it, which in my case it doesn't. Hope this helps some one.


12 Posts

6 February 2008 at 9:21am

Thanks for those suggestions. I totally forgot about this thread until I recieved an email this morning.

I might give silverstripe another look then (currently still using my old Joomla! site).


Community Member, 4 Posts

31 March 2008 at 3:28pm

I just came upon the same problem. I had two Joomla! installations, one on the main site and one on a sub domain that is linked to a directory on the /public_html/ of the main site. As soon and I installed SliverStripe on the main site, my subdomain Joomla install stopped working. I tried turning the RewriteEngine off, which made the sub directory work fine but stopped SilverStripe from working. Then I made a copy of the SilverStripe .htaccess and made the following changes:

RewriteEngine On

RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

RewriteCond %{REQUEST_URI} ^(.*)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule .* /index.php?url=%1&%{QUERY_STRING} [L]

RewriteBase /

basically just changing /sapphire/main.php from SilverStripe to the index.php of Joomla and uploaded this to the sub domain. Now everything works fine. Hope it helps.

Frank Juval

Community Member, 3 Posts

11 November 2008 at 5:47pm

I had the same problem and I think I found the solution.

I emailed Silverstripe instead of coming here. I got help but was reminded that the forum was the place to be.

Anyway, tech support at my host site said it was an .htaccess problem so he commented out the line:

RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]

I was back to a static page for my site.

Then I read this post. So I added an .htaccess file to all my subdomains. Nothing worked. Although, this whole time one subdomain wasn't affected. So I opened that .htaccess file and it read:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /monkeychow/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /monkeychow/index.php [L]

# END WordPress

One of my blogs is on (just to give a little history to help this make sense).

So I copied and pasted the above code into each .htaccess file for each directory, but just changed "monkeychow" to the name of the specific directory each .htaccess file was in. It worked!

You'll also want to make sure that there's an "index.php" file in the directory you're pointing it to. If there's an "index.html" file instead, just change that last line to read:

RewriteRule . /directory_name/index.html [L]

Do you understand? Or does this confuse you more?

I'm sure the "Begin WordPress...End WordPress" has to be changed accordingly as well. It just so happens that my blogs are with WordPress so I kept that in.


Community Member, 5 Posts

13 November 2008 at 1:32am


you made me a verry happy man lol

Go to Top