简体   繁体   中英

Best way to organize a website root

I have made a website (WP based) and put every stuff inside the /site folder.

I did that, thinking of creating "custom" systems, and putting each one inside a folder, so for example: /promo would go to something else than the website...

But, I have tried with both .htaccess redirect and PHP location redirect, and when I try to "share" the website, without it's /site folder included, Facebook doesen't detect's the site meta...

Also, is it a problem for google, to use redirect's when accessing the website without the /site WP home folder? I mean, a guy comming from a www.onesite.com would have it's "referer" header as onesite, or mysite?

Thanks

I feel like you're creating your own problems. Just put WordPress in document root and don't bother with rewriting to a subdirectory. WordPress won't delete any custom files or folders when updating.

If you have some custom part that you want to reach through http://www.example.com/promo . Put it in the promo folder under the document root.

If want to reach the custom part through http://promo.example.com , just create new virtual host .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM