PHP code in httd.conf (APACHE WEB SERVER)

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
pradeep.bondla
Forum Newbie
Posts: 3
Joined: Mon Jun 02, 2008 5:38 am

PHP code in httd.conf (APACHE WEB SERVER)

Post by pradeep.bondla »

Hi,
I am using APACHE 2.0 HTTP web server.
My requirement is....
1) I need to set a userId to a header variable (say pradeepId to set to REMOTE_USER)
2) I need redirect to some other site with this Header variable.
what I did in httpd.conf document

Code: Select all

<IfModule mod_headers.c>
       Header add REMOTE_USER pradeepId
       Header unset REMOTE_USER
</IFModule>
and after that

Redirect / http://<host>:50100/irj/portal

Now the problem is.... :cry:
I am able to redirect to the some other portal
But Header variable has not been set.
Did I make any mistake. Please send the PHP code to set the Header variable and send it to someother portal.

regards
Pradeep :banghead:
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: PHP code in httd.conf (APACHE WEB SERVER)

Post by onion2k »

Posting the same topic in 3 folders is unnecessary. Don't do it again.
pradeep.bondla
Forum Newbie
Posts: 3
Joined: Mon Jun 02, 2008 5:38 am

Re: PHP code in httd.conf (APACHE WEB SERVER)

Post by pradeep.bondla »

yes I know its not the right way....
But what to do? I am not a PHP user till now... and got a assignment on this... I have to solve it by evening...
that is why I posted in 3 places...
Post Reply