/    Sign up×
Community /Pin to ProfileBookmark

curious server redirect – help

Hi all

I’ve built an admin panel for teachers to add e-learning content to the school website via home. But for some reason, the server always tries to redirect them to the server NAME (which happens to be ‘orion’). This is obviously no good as their IP can’t talk to it by name, only via the [url]www…[/url] method.

I’ve no idea how to alter this, or even if it’s PHP’s doing or not. It doesn’t happen with the main website content, only the admin panel. The only difference I can think of is that the admin panel calls a text file from below the root web level (for security).

How can I get the server to navigate with the full [url]www…[/url] address and not be clever and attempt to talk to the server by name?

Thanks in advance.

p.s. we’re running Apache 2.0 and PHP 4.2.2 on Red Hat 9 Linux.

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@crh3675Jul 21.2004 — 
I've no idea how to alter this, or even if it's PHP's doing or not.
[/quote]


Most likely there are multiple Virtual Hosts setup on the server and the "orion" entry is the default. A virtual host means that if you try to access the server by Ip address solely, it will return the first virtual site it finds. Which means you have to access your admin section by www address
Copy linkTweet thisAlerts:
@mityaauthorJul 22.2004 — Thanks Craig, I've passed your comments on to our server guy.

Don't suppose you'd happen to know also why going to a folder doesn't return a default page (e.g. index.php). Again, going to the main domain DOES, but the control panel won't find its default page. I've even set up redirecting index.htm/html files in case it finds them first.

This is all odd!
Copy linkTweet thisAlerts:
@crh3675Jul 22.2004 — Again, sounds like a conf file issue. If permission are set to allow .htaccess files, you can specify your index files in a .htaccess file (assuming you are on a Unix/Linux server). Now, if you are trying to resolve an address like:

http://208.228.155.90/subfolder

it won't work if the DNS isn't configured correctly. However it will work if accessed with the slash:

http://208.228.155.90/subfolder/
Copy linkTweet thisAlerts:
@mityaauthorJul 22.2004 — Thanks again Craig, I'll pass your latest post on to our server guy. I'm merely the developer!
×

Success!

Help @mitya spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...