我正在练习laravel,并且已经上传到生产环境中,然后我遇到了一些问题,它只是在“有时”发生,当我突然移动访问路线(移动菜单/路径)时,突然禁止访问403 <<<< ,但如果我清除浏览器,则我的路线(菜单/路径)再次正常工作就没问题,并且在时间流逝时再次发生
虚拟主机:
<VirtualHost *:80>
# Index file and Document Root (where the public files are located)
DirectoryIndex index.php
DocumentRoot /var/www/html/tes/app/public
<Directory /var/www/html/tes/app/public>
Options +Indexes +Includes +FollowSymLinks +MultiViews +ExecCGI
AllowOverride All
Require all granted
</Directory>
# Custom log file locations
#LogLevel warn
#ErrorLog /var/log/apache2/error-tes.log
#CustomLog /var/log/apache2/access-tes.log combined
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
我的路线
Route::get('/', 'PenggunaController@index');
Route::post('/submitlogin', 'PenggunaController@submitlogin');
Route::prefix('workorder')->group(function () {
Route::get('inprogress', 'WorkorderController@fetchinprogress');
});
Route::prefix('request')->group(function () {
Route::get('inprogress', 'MyreqController@index');
Route::get('/myreq/{id}/{flag}', 'MyreqController@flag');
Route::get('/emp', 'MyreqController@emp');
Route::get('history', 'MyreqController@history');
});
感谢您的关注