Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » .htaccess vs. other url then expected vs. hostfile

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

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

Page: 1
Go to End
Author Topic: 819 Views
  • lerni
    Community Member
    80 Posts

    .htaccess vs. other url then expected vs. hostfile Link to this post

    say hi to silverstripe the first time ;-)

    my hoster provids a way to access the server without a hot dns-entry like:

    this is nice to show the page to the customer or let them fill in contents bevor you go live. but somehow %{REQUEST_URI} does not work with .htaccess and this form ( of url. the server tells me servererror 500 (apache).

    I konw it's possible to access the server with a hostfile-entry but this seems for some people a too big challenge. can anybody point me in the right direction to make the url rewriting work with both or at last the "" kinda url?

    this is how .htaccess looks like:

    RewriteEngine On
    RewriteBase /

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

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

    thx for any help in advance

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.