adam Kearsley
adam Kearsley

Reputation: 999

Laravel htaccess issue on OSX Snow leopard

Im having an issue with Laravel's htaccess file on my OSX setup. I have been running the applications perfectly on WAMP, but when i transferred to my Mac i started to get issues.

the htaccess is default

    # Apache configuration file
    # http://httpd.apache.org/docs/2.2/mod/quickreference.html

    # Note: ".htaccess" files are an overhead for each request. This logic should
    # be placed in your Apache config whenever possible.
    # http://httpd.apache.org/docs/2.2/howto/htaccess.html

    # Turning on the rewrite engine is necessary for the following rules and
    # features. "+FollowSymLinks" must be enabled for this to work symbolically.

     <IfModule mod_rewrite.c>
        Options +FollowSymLinks
        RewriteEngine On
     </IfModule>

    # For all files not found in the file system, reroute the request to the
    # "index.php" front controller, keeping the query string intact

     <IfModule mod_rewrite.c>
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php/$1 [L]
     </IfModule>

I am using V-Hosts to have a XXXXXXX.laravel URL.

Ive added the URL to my config file and left the index blank.

Everytime i visit the homepage XXXXXXX.laravel i get the homepage, but when i navigate to XXXXXXX.laravel/test i get a 404.

If i try XXXXXXX.laravel/index.php/test it works ok.

If i add index.php to the index in the config file, it just appends the index.php to my links.

Any ideas?? Thanks Adam,

Upvotes: 0

Views: 562

Answers (2)

xavier
xavier

Reputation: 11

I had the same problem, and solved it by putting rewrite conf in the <Directory /> block of my apache conf file for the virtual host. I am using Laravel 4.

Upvotes: 0

Boris Brdarić
Boris Brdarić

Reputation: 4684

Open Apache httpd.conf and check if you have mod_rewrite turned on

LoadModule rewrite_module modules/mod_rewrite.so

and not turned off like this

#LoadModule rewrite_module modules/mod_rewrite.so

Upvotes: 2

Related Questions