「PHP」Laravel osx 設定 .htaccess
apache config
- 設定 vim httpd.conf 的 AllowOverride All
- sudo apachectl restart
<VirtualHost *:80>
DocumentRoot /Library/WebServer/Documents
<Directory /Library/WebServer/Documents>
AllowOverride All
Allow from all
</Directory>
RailsEnv development
Alias /noteBox /Users/cake/Web_www/noteBox/public
<Directory /Users/cake/Web_www/noteBox/public>
#PassengerAppRoot /home/User/web_ror/home/public
PassengerAppRoot /Users/User/Web_www/noteBox
Allow from all
Options -MultiViews
#RailsBaseURI /rails
</Directory>
</VirtualHost>
Laravel 中 public/.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
沒有留言:
張貼留言