Welcome Guest, Not a member yet? Register   Sign In
Public folder with htaccess?
#1

Hello,

How to direct to public folder? With htaccess?
Reply
#2

(This post was last modified: 06-07-2019, 12:45 PM by donpwinston.)

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

(This post was last modified: 06-07-2019, 03:04 PM by edica.)

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, 12: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




Theme © iAndrew 2016 - Forum software by © MyBB