How to host the Primary Domain from a subfolder without showing subfolder in browser url
Hi, I tried to look for solutions, but i couldn't get it. i hope anybody can help me to solve my issue.
i have a primary website domain : "example.com
i install wordpress inside the folder : main
the website can be access by visiting : "www.)?example.com$
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subdirectory/
# Don't change the following two lines.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /subdirectory/$1
# Change example.com to be your main domain again.
# Change 'subdirectory' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ subdirectory/index.html [L]
Anybody can help me to resolve my problem? really appreciate your help :) Thank you.
Anybody can help me to resolve my problem? really appreciate your help :) Thank you.
-
You might find the section entitled Method II (With URL change) is what you want from the following WordPress codex pages: Giving WordPress Its Own Directory " WordPress Codex 0 -
Hello, You can follow the instructions under the "Moving Directories On Your Existing Server" section on the following WordPress document: Moving WordPress " WordPress Codex Let us know if that helps. Thank you. 0 -
You might find the section entitled Method II (With URL change) is what you want from the following WordPress codex pages: Giving WordPress Its Own Directory " WordPress Codex
Thank you alot bro, it works :)0 -
Hello, You can follow the instructions under the "Moving Directories On Your Existing Server" section on the following WordPress document: Moving WordPress " WordPress Codex Let us know if that helps. Thank you.
Thank you, problem solve :)0
Please sign in to leave a comment.
Comments
4 comments