nortk Posted January 4, 2005 Posted January 4, 2005 Hello there. I wish to have a subdomain that takes users directly to a phpnuke site. So, I have set up the subdomain and the phpnuke stuff using CPanel. Everything pretty much works as I want it: csa163.krumpe.com takes users to the phpnuke start page. Even csa163.krumpe.com/index.php would take users to the phpnuke start page. However, when I try to go to the admin page, I would LIKE to be able to get there by typing csa163.krumpe.com/admin.php But, when I do, I get an "Access is denied" message from the admin script. However, when I go to the admin page by entering krumpe.com/csa163/admin.php, there is no problem. In other words, either way, I am able to get to the admin.php script, but somehow that script doesn't like it when I try to get there via my subdomain name. Does anyone have any experience with this? Is this something that needs to be modified in phpnuke? Thanks for your help. Quote
woesap Posted January 4, 2005 Posted January 4, 2005 I dont know it that well but what adress is in the configuration file for the ' LIVE' directory of phpnuke. When it is www.domain.com/subdir then a rotuing from subdir.domain.com might not work ?! Maybe you can look inti that and play with it and see what happens? And more hopefully someone comes along who has actual experience with it..... Good luck! Quote
TCH-Rob Posted January 5, 2005 Posted January 5, 2005 Did you create the folder for your subdomain first and then use cPanel to create it or did you just create the subdomain and then install nuke in that directory? Quote
nortk Posted January 5, 2005 Author Posted January 5, 2005 I've tried it both ways. The TCH CPanel script for installing phpnuke doesn't work with a preexisting directory. I've started from scratch a couple times, uninstalling and reinstalling both phpnuke and the subdomain in different orders. I've even installed phpnuke into a folder named csa163, renamed the folder, created the csa163 subdomain, and then moved all of phpnuke into the subdomain folder. It always gives the same results. I've poked around a little in the admin.php file, and found that this is the check that's causing a problem: >if ($_SERVER['SERVER_NAME'] != $domainname AND $_SERVER['SERVER_NAME'] != "localhost") { echo "Access denied"; die(); } It turns out that the value of $_SERVER['SERVER_NAME'] is my subdomain name, csa163.krumpe.com, but that the value of $domainname is www.krumpe.com. So, I looked a little further...in phpnuke's config.php, $domainname is set to www.krumpe.com. I thought that my problem might be solved by changing that to csa163.krumpe.com. That DID fix the problem...I could now use csa163.krumpe.com/admin.php...but it created some new problems. In particular, I noticed that the "security code" feature of phpnuke stopped working correctly after changing the value of $domainname. So, I'm at a loss over something that really is a pretty minor thing. I just thought I'd run it by people here because it seems like something someone might have come across before. Thanks for your help. Norm Krumpe Quote
Prel Posted January 6, 2005 Posted January 6, 2005 Hi Nortk, I find this solution more easy: Redirect www.******/index.htm for www.yourdmain.com/phpnuke Only this. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.