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 FuerteDeveloper and AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Olaf DoschkeSoftware 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 FuerteDeveloper and AnalystAuthor 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Sometimes problems arises just because incorrect FTP configurations is done at cPanel.

After support, things became clear!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.