0

I already remove the public from url when i access the website. i have just created .htaccess in root directory and that contains this code:-

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule    ^$    public/    [L]
RewriteRule    (.*) public/$1    [L]
</IfModule>

Now when i access the website it is not showing public and running fine. Now problem is that when i type my website like :- www.example.com/public -> it is still opening i want to show 404 page can anyone help me how to do that.. Thanks in advance

kunal
  • 4,122
  • 12
  • 40
  • 75

2 Answers2

0

If you are using apache server it can be done with the help of virtual hosts. In case IIS you can do it by setting your physical path directory to point to public directory of your project.

0

Just follow these steps to get it working:

 1. Rename server.php to index.php in the root folder of your project
 2. Now move the .htaccess file from public folder to the root folder of your project.

That's it. :)

Amrinder Singh
  • 5,300
  • 12
  • 46
  • 88
  • but when i access the image in server then i need to add public there this is not good way – kunal Oct 03 '17 at 12:26