Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

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: 781 Views
  • lerni
    Avatar
    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:
    http://99.99.99.99/~xyz

    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 (http://99.99.99.99/~xyz) 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 "http://99.99.99.99/~xyz" kinda url?

    this is how .htaccess looks like:

    ### SILVERSTRIPE START ###
    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]
    ### SILVERSTRIPE END ###

    thx for any help in advance
    luk

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