Could you point how to change the default folder where my site starts?

Hi Experts

Could you point how to change the default folder where my site starts?

My PHP IDE  (and also Filezilla)  maps the FTP folders accordingly to:

img001
img002
Instead of directly to public_html - accordingly to cPanel  Folder Manager:

img003


Since I'm going to necessarily to work from this folder, I have to redirect my site do this folder

So
www.espiriplug.com.br  must necessarily to  redirect to  http://www.espiriplug.com.br/espiriplug/

I guess something else must to be done at my .htaccess to get it done

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule ^(.*)/$ /$1 [L,R=301]
    
    #RewriteRule ^(.*)$ https://espiriplug.com.br/$1 [R,L]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

Open in new window


Could you suggest what must to be done and if possible any other suggestion to workaround it (like how to change the folder where Mozilla start reading to public_html) ?

Thanks in advance!
Eduardo FuerteAsked:
Who is Participating?
 
Eduardo FuerteConnect With a Mentor Author Commented:
Well

After talking with GoDaddy  (very good suport) - When creating a FTP user doesn't fill anything
img004
So FTP will open all the directory
1
 
Olaf DoschkeConnect With a Mentor Software DeveloperCommented:
As far as I understand you want visitors to be temporarily redirected to a subfolder and continue developing in the main webroot.

301 redirect is a permanent redirect, you shouldn't do that, but 302 temporary redirects.

To develop and test new versions, I would prefer subdomains, though. Your hoster should let you define some, so you could have one for development and another for testing.

Subdomains will have another root folder, but the biggest advantage is relative URLs and anything else stays, just the base URL doesn't start www but whatever subdomain name you choose.

Bye, Olaf.
0
 
Eduardo FuerteAuthor Commented:
Sometimes problems arises just because incorrect FTP configurations is done at cPanel.

After support, things became clear!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.