Jump to:

4952 Posts in 14106 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Basic URL Rewrite not working

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

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

Page: 1
Go to End
Author Topic: 607 Views
  • tom.stray
    Avatar
    Community Member
    1 Post

    Basic URL Rewrite not working Link to this post

    Hi,
    I have a more complex rewrite in mind, but for this I'll use a generic example. Lets say I want the /admin/ section to appear as /radical-admin/ I've tried to teset this using this rewrite:

    RewriteRule radical-admin admin [NC] # test

    This is in the .htaccess inside assets folder. The whole section looks like:

    <IfModule mod_rewrite.c>
       DirectoryIndex index.php
       SetEnv HTTP_MOD_REWRITE On
       RewriteEngine On

       RewriteBase /
    RewriteRule radical-admin admin [NC] # test
       
    RewriteCond %{REQUEST_URI} ^(.*)$
       RewriteCond %{REQUEST_FILENAME} !-f

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

    </IfModule>

    However, nothing happens at all. If I comment out #RewriteBase / the whole system falls over with 500 Error, so the .htaccess file is definitely in effect.

    Also if I try a crazy rewrite like .* I can see this kicking in to some extent.

    So basically, I want http://www.mysite.com/radical-admin/ to work and show the login screen. Any ideas?

    Just want to get a really simple rewrite going and then move on to the actual one I have in mind.

    607 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.