I uploaded files of my Laravel project at Plesk server in httpdocs folder and change necessary permission. Now my homepage is working fine but other routes showing 404 server error ( see screenshot [http://prntscr.com/h54nra][1])
For checking few solutions in different forums and at stackoverflow I also tried to make changes in my .htaccess file but yet unable to resolve.
Currently I am using following code hor .htaccess file which is working fine on my localhost
<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}]
Let me know if you find any solution for this
2
Answers
Since you are using IIS, .htaccess is not involved into redirects to open any of sub-pages except the main page. Instead, redirects should be specified in domain’s web.config file, for example:
This file should be placed in domain’s httpdocs or httpdocs/public folder, depending on the project configuration.
The following tutorials may provide some other details regarding setting up Laravel in IIS: here and here
I have faced the same problem in my Plesk server, MY project was done in Laravel. So, I have edited two major files to solve this problem. Please find the below changes.