TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
.htaccess file to remove index.php not working on mac
  • I have an .htaccess file

    # Turn on URL rewriting
    RewriteEngine On

    # Put your installation directory here:
    # If your URL is www.example.com/kohana/, use /kohana/
    # If your URL is www.example.com/, use /
    RewriteBase /project/

    # Protect application and system files from being viewed
    RewriteCond $1 ^(application|system)

    # Rewrite to index.php/access_denied/URL
    RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]

    # Allow these directories and files to be displayed directly:
    # - index.php (DO NOT FORGET THIS!)
    # - robots.txt
    # - favicon.ico
    # - Any file inside of the images/, js/, or css/ directories
    RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|images|js|css|assets|upload)

    # No rewriting
    RewriteRule ^(.*)$ - [PT,L]

    # Rewrite all other URLs to index.php/URL
    RewriteRule ^(.*)$ index.php/$1 [PT,L]


    This works fine to remove the index.php on all the windows machines we've used it on but it doesn't work with the mac machines. We don't get an error, it just doesn't remove the index.php.
    Anyone know if this is likely a problem in the .htaccess file or if it's more likely a apache config issue?

    Cheers
  • Hi. I think the problem is in apache vhost.conf

    Check for AllowOverride All, else .htaccess will not be recognized by apache. It is disabled by default

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion