• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Public folder with htaccess?

#1
Hello,

How to direct to public folder? With htaccess?
Reply

#2
For apache you need to configure httpd.conf.
...
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/path/to/public"
<Directory "/path/to/public">
...
Simpler is always better
Reply

#3
There is also another line. In bold below. Does it need to be changed too?

<Directory /home/user/web/domain.com/public_html/public>
        AllowOverride All
        SSLRequireSSL
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir /home/user/web/domain.com/public_html:/home/user/tmp
        php_admin_value upload_tmp_dir /home/user/tmp
        php_admin_value session.save_path /home/user/tmp
</Directory>
Reply

#4
I don't know what the php_admin_value ... lines are. I don't have those.
Simpler is always better
Reply

#5
I'm using Vesta panel. (vestacp.com)
Reply

#6
(06-07-2019, 01:39 PM)edica Wrote: Hello,

How to direct to public folder? With htaccess?

I just posted this for a similar question hope this helps

https://forum.codeigniter.com/thread-73929.html
Reply

#7
For those using VestaCP with CentOS system:

https://gist.github.com/edica/c89b4c50ee...ca59d0bd8c
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.