If you are just getting started with PHP, you would find this useful. While Working directly with php and laravel and accessing the admin page, you might experience the 403 forbidden permission access error.
This error can be caused by different things.
The author restricted access to the admin page mostly for security reasons.
You need to give the 777 permission in your htdocs. First go into your htdocs folder, then use this command: chmod 777 -R [foldername].
This could be as a result of missing or misconfigured .htaccess file. If that is the issue, go to the documentation and get the correct configuration to look like this:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
- It can also be because you have not properly set up your .env file.
- It can also mean you have a folder in your public folder named 'admin'.
- Go to your public folder
- and change the name of the file. eg, admin_assets or whatever you choose.
Reload your browser and you should be able to view your admin page.
There are other reasons for the forbidden 403 error, however, these are the most common in php Laravel.
Follow me on Twitter Handle: https://twitter.com/mchelleOkonicha
Follow me on LinkedIn Handle: https://www.linkedin.com/in/buchi-michelle-okonicha-0a3b2b194/