someone235

Member
Jul 25, 2014
5
0
1
cPanel Access Level
Root Administrator
Hi, I have this line in .htaccess :
Code:
RewriteRule ^sites/([^/]+)/sitemap.xml$ /usr/local/apache/htdocs/sitemap.php?slug=$1
But SuPHP prevents me from accessing "/usr/local/apache/htdocs/" from other sites. Someone knows how to solve it?
Thanks in advance
 

someone235

Member
Jul 25, 2014
5
0
1
cPanel Access Level
Root Administrator
Most of my domains use the same files, so I put all the files I need in htdocs, and then I don't need to update my DNS for every domain that is pointed to my server.
But I need an alternative way to access the sites without the domains (until the DNS is updated), so I want that the URL /http://myprimarydomain.com/sites/domain.com will point to the same file as /http://domain.com, but the problem is that myprimarydomain.com is not in htdocs, and uses a different user, so it cannot access htdocs files.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

My advice would be to update the "hosts" file on your personal computer if you need a method to access your websites before the name servers are updated. The method you are considering currently is not secure.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
It's not recommended without sacrificing the security of your system. If you did plan to complete this type of setup, you may want to consider using another PHP handler such as DSO.

Thank you.