Sep 2, 2022
2
Level 1
Laravel website works only with index.php in url on iis server
Hi @all I deployed the laravel website to iis server. But I have a problem. The problem is that works only with index.php in url. for example:
localhost:80/ ------------------works well localhost :90/login --------------not working localhost:80/index.php/login------works well
I though the reason is .htaccess. so I have been trying to find the way to fix this problem for a week. But no more result works well. I found the way works by others in this platform.
DirectoryIndex index.php
Options -MultiViewsRewriteEngine On
RewriteCond %{REQUEST_URI}:: ^(/.+)/(.*)::$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule .? %{ENV:BASE}/index.php [L]
But this htaccess doesn't work on iis. E and ENV are not supported thing on iis. I want you to help me. thanks.
Please or to participate in this conversation.