Welcome to HostingForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

dynamic pages?

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Related Topics:
Redirecting multiple dynamic (php) pages? - Please bare with me if this has already been asked before but I have been trying to figure out how to use .htaccess to redirect dynamic The situation is this. I am running a site on a virtual server running Apache. I have access to modify..

Im sick of java and tomcat, what is good apache combo for .. - damn im so sick fo java and tomcat

dynamic IP - I have two system with dynamic ip addresses windows 98se window xp What so i set the Network Domain and Server Name to. My IP Address changes every week... Thanks

Dynamic ProxyPass - Hi all, I'm trying to set-up on a web-site, that will act as a proxy to other web servers. I.e: /app/ /test/ /mail/ I that I will be adding many..

Dynamic Configuration - Hi folks. Is there a way to make apache read the from a the files just by reading the db with perl is a possible way,but not The sense behind:i want to create a web-based
Next:  I: Changing "internet" user  
Author Message
Svejk

External


Since: Feb 25, 2008
Posts: 4



(Msg. 1) Posted: Mon Feb 25, 2008 11:04 am
Post subject: dynamic pages?
Archived from groups: alt>apache>configuration (more info?)

Hi,

Any idea how I can deliver this page:

<html><body>Hello from foo</body></html>

to anyone visiting /foo
such that it appears to the browser to actually come from /foo

and

<html><body>Hello from bar</body></html>

to anyone visiting /bar
such that it appears to the browser to actually come from /bar

I'm using apache 2.2.

Many thanks,
Svejk

 >> Stay informed about: dynamic pages? 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2994



(Msg. 2) Posted: Mon Feb 25, 2008 11:04 am
Post subject: Re: dynamic pages? [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived

 >> Stay informed about: dynamic pages? 
Back to top
Login to vote
Svejk

External


Since: Feb 25, 2008
Posts: 4



(Msg. 3) Posted: Mon Feb 25, 2008 11:04 am
Post subject: Re: dynamic pages? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2008-02-25 12:01:58 +0000, Davide Bianchi
<davideyeahsure.RemoveThis@onlyforfun.net> said:

> On 2008-02-25, Svejk <thegoodsoldiersvejkREMOVE.RemoveThis@gmail.com> wrote:
>> Any idea how I can deliver this page:
>>
>> to anyone visiting /foo
>> such that it appears to the browser to actually come from /foo
>> and
>>
>> to anyone visiting /bar
>> such that it appears to the browser to actually come from /bar
>
> I'd say creating two directories, one 'foo' and one 'bar' and put
> the two pages in there as 'index.html'. But I suspect that this is
> not the answer you want. So why don't you elaborate a bit on your
> problem?
>
> Davide

OK. foo and bar can be any alphanumeric string.

I am trying to set up a bit of a hack for a test with OpenID. I
actually want to generate:

<html>
<head>
<link rel="openid.server" href="https://login.server/login" />
<link rel="openid.delegate" href="http://identity.url/ID" />
</head>
</html>

For ANY user ID, whether they exist or not (because I don't want to
bother validating them at this stage).

But the problem reduces to that above, I think.

Thanks,
Svejk
 >> Stay informed about: dynamic pages? 
Back to top
Login to vote
Svejk

External


Since: Feb 25, 2008
Posts: 4



(Msg. 4) Posted: Mon Feb 25, 2008 11:04 am
Post subject: Re: dynamic pages? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2008-02-25 11:39:05 +0000, Svejk <thegoodsoldiersvejkREMOVE RemoveThis @gmail.com> said:

> Hi,
>
> Any idea how I can deliver this page:
>
> <html><body>Hello from foo</body></html>
>
> to anyone visiting /foo
> such that it appears to the browser to actually come from /foo
>
> and
>
> <html><body>Hello from bar</body></html>
>
> to anyone visiting /bar
> such that it appears to the browser to actually come from /bar
>
> I'm using apache 2.2.
>
> Many thanks,
> Svejk

Answering my own question, sorry.
I've done something like this, which seems to work:

In /cgi-bin/hello.cgi...

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><body>Hello from ";
print $ENV{'QUERY_STRING'};
print "</body></html>";

With this in an Apache Directory tag:

RewriteEngine on
RewriteRule ^([a-zA-Z0-9]+)$ /cgi-bin/hello.cgi?$1

If there's a nicer way, please let me know.

Thanks,
Svejk
 >> Stay informed about: dynamic pages? 
Back to top
Login to vote
Svejk

External


Since: Feb 25, 2008
Posts: 4



(Msg. 5) Posted: Mon Feb 25, 2008 3:44 pm
Post subject: Re: dynamic pages? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2008-02-25 15:12:43 +0000, Svejk <thegoodsoldiersvejkREMOVE.RemoveThis@gmail.com> said:

> On 2008-02-25 11:39:05 +0000, Svejk <thegoodsoldiersvejkREMOVE.RemoveThis@gmail.com> said:
>
>> Hi,
>>
>> Any idea how I can deliver this page:
>>
>> <html><body>Hello from foo</body></html>
>>
>> to anyone visiting /foo
>> such that it appears to the browser to actually come from /foo
>>
>> and
>>
>> <html><body>Hello from bar</body></html>
>>
>> to anyone visiting /bar
>> such that it appears to the browser to actually come from /bar
>>
>> I'm using apache 2.2.
>>
>> Many thanks,
>> Svejk
>
> Answering my own question, sorry.
> I've done something like this, which seems to work:
>
> In /cgi-bin/hello.cgi...
>
> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
> print "<html><body>Hello from ";
> print $ENV{'QUERY_STRING'};
> print "</body></html>";
>
> With this in an Apache Directory tag:
>
> RewriteEngine on
> RewriteRule ^([a-zA-Z0-9]+)$ /cgi-bin/hello.cgi?$1
>
> If there's a nicer way, please let me know.
>
> Thanks,
> Svejk

Well, it sort-of works, except that if there's a /test/index.html, then
visiting

/test

will result in the /test/index.html page (strange, but that's ok), but
appearing to come from:
/test/?test

Not sure why, but then I don't pretend to know anything about rewriting.

Can anyone explain why the /test/index.html was returned and what the
"?test" is doing there?

Svejk
 >> Stay informed about: dynamic pages? 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]