The requested URL /ProjectName/users was not found on this server. Laravel
Steps for Apache Web Server and Laravel in Linux Environment.
Open httpd.conf
sudo vim /etc/httpd/conf/httpd.conf
# for debian users: /etc/apache2/apache2.confMake sure the DocumentRoot is pointing to the laravel project's public directory
Add the Directory element for that path and Allowoverride All... as follows
DocumentRoot "/var/www/html/laravel/public/"
<Directory "/var/www/html/laravel/public">
Allowoverride All
</Directory>Open .htaccess from ../laravel/public/ and make sure it has the following
<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>Restart httpd services
sudo service httpd restart
Now
http://DomainServer/users
will work in your browser.
laravel the requested url was not found on this server
This looks like you have to enable .htaccess
by adding this to your vhost:
<Directory /var/www/html/public/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
If that doesn't work, make sure you have mod_rewrite enabled.
Don't forget to restart apache after making the changes! (service apache2 restart
)
URL was not found on this server laravel
You need to setup .htaccess
rewrite on your server. You may need to install and enable the mod_rewrite
apache module (or similar alternative for your chosen http server).
Check that the public folder for your app has a .htaccess
file, similar to:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
See latest laravel release.
laravel 5.0: The requested URL was not found
Try to enable mod_rewrite and change folder permissions:
sudo chmod 755 -R laravel_folder
chmod -R o+w laravel_folder/storage
Related Topics
Regex, Get String Value Between Two Characters
Using SQLite3 in PHP How to Count the Number of Rows in a Result Set
PHP Get Content of Http 400 Response
Codeigniter Csrf Valid for Only One Time Ajax Request
PHP Exec: Does Not Return Output
How to Use MySQLi_Query() in PHP
How to Take a Photo and Send to Http Post Request with Android
How to Send Multiple Attachment in Single Mail in PHP
Sort Xml via Attribute Value PHP
Can Anyone Get Access to My PHP Source Code
Getting the Full Url Including the Query String After Hash
How to Apply a Function to an Array
Fatal Error: Class 'Mongodb\Driver\Manager' Not Found
Codeigniter - File Upload Required Validation
What Is 22527 in Error_Reporting 22527 of PHPinfo
PHP Authentication with Multiple Domains and Subdomains
How to Send a Bytearray (From Flash) and Some Form Data to PHP