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.

Installing SilverStripe /

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

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

mod rewrite issue or?


Reply


5 Posts   2121 Views

Avatar
bit99

Community Member, 24 Posts

13 May 2011 at 10:28am

Hi,

I have a question (re: server configs is my guess),

Everything works on this new silverstripe website I put up, but there are a couple of strange (to me) things going on.
when installing, I had the hosting company make the necessary upgrades to the server such as memory limit, mod rewrite, magic quotes,

everything works on the website but the login panel is not (like on my other websites) located at /admin, but instead at index.php/admin
same thing with /dev/build?flush=1, is located at index.php/dev/build?flush=1
The previous pages get a 404 not found error page.

is this a mod rewrite issue on the server? or something else?
Has anyone seen this before?

thanks,

Avatar
bit99

Community Member, 24 Posts

13 May 2011 at 11:31am

to add to previous post,

pages in the addressbar appear as:
/index.php/company
/index.php/contact

etc.

is this a mod_rewrite issue with the server config?

Avatar
Mrfixer

Community Member, 49 Posts

13 May 2011 at 8:23pm

looks certainley like a mod rewrite issue, had this myself just a few days ago.

my advice would be run a php info test, to see if mod rewrite has been enabled by your host (who is your host by the way?). I had to do the mod rewrite myself via .htaccess (needed two files to do it) attached below:

.httacess (this one goes in public_html)

### 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
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]

</IfModule>
### SILVERSTRIPE END ###

.httacess (this one goes one folder above public_html)

<IfModule mod_suphp.c>
   suPHP_ConfigPath /home/user/php.ini
   <Files php.ini>
      order allow,deny
      deny from all
   </Files>
</IfModule>

your mileage may vary but its worth a try..

Avatar
bit99

Community Member, 24 Posts

14 May 2011 at 4:33am

thanks,
I called the webhost and mentioned a possible mod_rewrite issue and a bit later it was fixed.
so that seems to have been it.

Avatar
Plato

Community Member, 26 Posts

19 May 2011 at 2:07pm

I've had this issue a few times, and find it's normally caused when I've made a mess of the RewriteBase directive in the silvestripe-root .htaccess

Make sure your rewrite base is relative to the domain that accesses the install (and of course that your host has mod_rewrite enabled).

eg:

example.com/ -> RewriteBase /
example.com/ss/ -> RewriteBase /ss/