sada059
2767
9
Laravel

How to remove index.php from URL

Posted 3 years ago by sada059

I have hosted my Laravel 5 App with Oracle Linux and I have it working fine but the problem is my URLs runs with index.php suffix. I am trying to get rid of this index,php from my URLs. My .htaccess file is in my root directory var/www/public_html (Public folder files are moved to root directory) here is the content of file.

Options -MultiViews

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]

the .htaccess file shows under hidden files.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.