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]
3
  • 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 and using rewrites Commented Feb 27, 2022 at 8: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, Commented Feb 28, 2022 at 11:29
  • So it is closed? Commented Mar 1, 2022 at 8:09

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.