I have renamed server.php file to index.php and added .htaccess code as follows
<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>
url is working fine now, it is working without url, but
asset()
public_path()
function are not working properly. css, js , images are not called properly.
{{ asset('assets/css/custom.css') }}
Above code to all custom.css is not working, it was working properly before. If I add public than it work properly, but that is not correct way.
{{ asset('public/assets/css/custom.css') }}
Let me know how can I add public globally to these function.
I also tried to remove url using this reference but it doesn't work. How can I remove “public/index.php” in the url generated laravel?