Rewrite not working



  • Hi,

    I have setup Ideaspace VR as per the documentation, but I need to manually add index.php before going to admin page. I can confirm that mod_rewrite is enabled and can see from phpinfo. I have .htaccess in webroot . Can someone help ?



  • Which version of IdeaSpace do you use?
    Are you using Apache as web server?
    The .htaccess file should look as follows:

    DirectoryIndex index.php
    
    <FilesMatch "artisan|composer.phar|composer.json|composer.lock|package.json|web.config">
        Order Allow,Deny
        Deny from all
    </FilesMatch>
    
    <IfModule mod_rewrite.c>
        <IfModule mod_negotiation.c>
            Options -MultiViews
        </IfModule>
    
        # Do not allow directory listings
        Options -Indexes
    
        RewriteEngine On
    
        # Redirect Trailing Slashes If Not A Folder...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)/$ /$1 [L,R=301]
    
        # Handle Front Controller...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
    </IfModule>
    

Log in to reply