Subdomain inside public_html
When I add Subdomain into public_html it is seen all content also inside main domain.
Example:
mySUbdomain.example.com/user/ID
When I check also main domain like example.com/user/ID it will be also the same content as it is inside public_html.
How to solve this as
main domain like example.com/user/ID should not be seen but all PHP and MYSQL should be functional.
-
Hello, You will need to update your custom rewrite rules in the .htaccess file under the public_html directory so they do not apply the sub-directories beneath it, or setup a rule in the .htaccess file in the subdomain's document root that ignores the .htaccess entries in the parent directory. You can find discussion of the specific rules to use on a URL such as this: .htaccess mod_rewrite - how to exclude directory from rewrite rule Thank you. 0 -
Is there also php INI settings that it prevents such mode without HTACCESS? 0 -
Is there also php INI settings that it prevents such mode?
Hello, There are no PHP settings to change in this case since the rules are coming from Apache's Mod_Rewrite module. Thank you.0 -
As I understand it will be possible to place rewrite inside public_htm folder but dangerous as it will be consequence for the subdomain and main domain. If I have SUBdomain like example.mymaindomain.com Which rule inside htaccess is the best as I do not like to create a loop that will also time out? Example inside SUBdomain folder which will be without any loop that will also time out: RewriteEngine On RewriteRule ^ 0
Please sign in to leave a comment.
Comments
4 comments