Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Sunnan's avatar

Laravel routes not working on cloudways hosting

All routes works find on local machine and other cpanel but on cloudways hosting it shows The requested URL was not found on this server.

https://drvet.pakwebhouse.com/login <- this doesn't work

https://drvet.pakwebhouse.com/index.php <- this work but it doesn't include CSS and JS

.htaccess is in root folder not in public

Options -MultiViews -Indexes
RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
0 likes
1 reply

Please or to participate in this conversation.