0

Question is simple , i want to remove my public url from my 000webhost website, i have done all steps , like to copy .htaccess from public to root , and changed server.php to index.php in root folder of laravel but it did not work for me in 000webhost but it works in other hostings Here is my .haccess

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]

# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
  • question unclear, is it you are trying to remove the `/public` from the url? there are at least 2 school of solutions for it since ages ago. please see [exposing only public inside public_html folder](https://stackoverflow.com/a/25749644/4648586) and [using rewrites](https://stackoverflow.com/a/34150013/4648586) – Bagus Tesa Feb 27 '22 at 08:51
  • when we host a website on live server, it directly access public folder from Laravel root directory. when can not access routes urls. So i wanted to remove public url so to access my routes. I solved my problem,, all was same as i described in my question but i changed index.php file in public to some other text,and same with index.php file of root directory, I simply copy index.php default laravel file and overide it with index.php in root and public folder, – saqib javed Feb 28 '22 at 11:29
  • So it is closed? – Mansjoer Mar 01 '22 at 08:09

0 Answers0