Jump to:

23013 Posts in 11540 Topics by 2825 members

General Questions

SilverStripe Forums » General Questions » .htaccess configuration

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

Page: 1
Go to End
Author Topic: 691 Views
  • bebabeba
    Avatar
    Community Member
    192 Posts

    .htaccess configuration Link to this post

    Hi!
    I install subsite module but not working properly. I read some discussion and I find the following solution but doesn't work correctly. The instruction on my subsite's link seems to be ignored. The correct URL should be: httpl://my_server/test/nuovapage?SubsiteID=3.
    In my .htaccess I wrote the following lines:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /test

    # Subsite rewrite
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{HTTP_HOST} ^subsite$
    RewriteRule .* sapphire/main.php?url=%1&SubsiteID=3&%{QUERY_STRING} [L]

    # Normal SilverStripe page
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    </IfModule>

    and in my config apache I wrote:

    <Directory "D:/test">
    Options Indexes FollowSymLinks
    DirectoryIndex index.php
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

    Alias /test "D:/test"
    Alias /subsite.test "D:/test"

    Can you help me to find correct instructions please?
    Thanks!

    691 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.