I am using a Lamp server on my computer. I started to use Laravel php framework. In my .htaccess , If I use Options +FollowSymLinks
, I get 500 error. And If I comment out , I have to use index.php
in my all addresses ..example:
/~ytsejam/blog/public/index.php/login
I use Arch Linux . Is there a way to solve it?
edit: I solved this by using virtual hosts. And deleting index.php from application/config/application.php
in laravel folder.
FollowSymLinks is a directive in your web server configuration that tells your web server to follow so called symbolic links. As one would expect, FollowSymLinks is an acronym for Follow Symbolic Links. FollowSymLinks is a very important setting that plays a role in your website security.
The server will only follow symbolic links for which the target file or directory is owned by the same user id as the link.
Parameter Options FollowSymLinks
enables you to have a symlink in your webroot pointing to some other file/dir. With this disabled, Apache will refuse to follow such symlink. More secure Options SymLinksIfOwnerMatch
can be used instead - this will allow you to link only to other files which you do own.
If you use Options
directive in .htaccess
with parameter which has been forbidden in main Apache config, server will return HTTP 500 error code.
Allowed .htaccess
options are defined by directive AllowOverride
in the main Apache config file. To allow symlinks, this directive need to be set to All
or Options
.
Besides allowing use of symlinks, this directive is also needed to enable mod_rewrite in .htaccess
context. But for this, also the more secure SymLinksIfOwnerMatch
option can be used.
You might try searching the internet for ".htaccess Options not allowed here".
A suggestion I found (using google) is:
Check to make sure that your httpd.conf file has AllowOverride All.
A .htaccess file that works for me on Mint Linux (placed in the Laravel /public folder):
# Apache configuration file # http://httpd.apache.org/docs/2.2/mod/quickreference.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>
Hope this helps you. Otherwise you could ask a question on the Laravel forum (http://forums.laravel.com/), there are some really helpful people hanging around there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With