Jump to:

23456 Posts in 18905 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » index.php must be there, without it different page (default with menu Home About us Contact)

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: 337 Views
  • sypou
    Community Member
    10 Posts

    index.php must be there, without it different page (default with menu Home About us Contact) Link to this post

    Dear all,

    I have this problem. The index.php must be at the url, if not I obtain the default page with the menu Home, About us, Contact.
    I guess it is related to the mod_rewrite.
    I use ms4w with Silverstripe 2.4.5

    .htaccess file in web/.htaccess

    <Files *.ss>
       Order deny,allow
       Deny from all
       Allow from

    <Files web.config>
       Order deny,allow
       Deny from all

    ErrorDocument 404 /assets/error-404.html
    ErrorDocument 500 /assets/error-500.html

    <IfModule mod_alias.c>
       RedirectMatch 403 /silverstripe-cache(/|$)

    <IfModule mod_rewrite.c>
       RewriteEngine On

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

    .htaccess file in web/assets/.htaccess

    Deny from all
    <FilesMatch "\.(html|HTML|htm|HTM|xhtml|XHTML|js|JS|css|CSS|bmp|BMP|png|PNG|gif|GIF|jpg|JPG|jpeg|JPEG|ico|ICO|pcx|PCX|tif|TIF|tiff|TIFF|au|AU|mid|MID|midi|MIDI|mpa|MPA|mp3|MP3|ogg|OGG|m4a|M4A|ra|RA|wma|WMA|wav|WAV|cda|CDA|avi|AVI|mpg|MPG|mpeg|MPEG|asf|ASF|wmv|WMV|m4v|M4V|mov|MOV|mkv|MKV|mp4|MP4|swf|SWF|flv|FLV|ram|RAM|rm|RM|doc|DOC|docx|DOCX|txt|TXT|rtf|RTF|xls|XLS|xlsx|XLSX|pages|PAGES|ppt|PPT|pptx|PPTX|pps|PPS|csv|CSV|cab|CAB|arj|ARJ|tar|TAR|zip|ZIP|zipx|ZIPX|sit|SIT|sitx|SITX|gz|GZ|tgz|TGZ|bz2|BZ2|ace|ACE|arc|ARC|pkg|PKG|dmg|DMG|hqx|HQX|jar|JAR|xml|XML|pdf|PDF)$">
       Allow from all

    # We disable PHP via several methods
    # Replace the handler with the default plaintext handler
    AddHandler default-handler php phtml php3 php4 php5 inc

    <IfModule mod_php5.c>
       # Turn the PHP engine off
       php_flag engine off

    httpd.conf in Apache/conf/httpd.conf

    #LoadModule reqtimeout_module modules/mod_reqtimeout.so
    LoadModule rewrite_module modules/mod_rewrite.so
    LoadModule setenvif_module modules/mod_setenvif.so
    #LoadModule speling_module modules/mod_speling.so

    To enable mod_rewrite, is this the right way to edit httpd.conf or not?

    Thank you,


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.