Sponsored Content
Special Forums Cybersecurity APACHE rewrite / redirect URL Post 302246167 by ampo on Monday 13th of October 2008 04:08:00 AM
Old 10-13-2008
APACHE rewrite / redirect URL

Hello.

I have scenario where a Client send request to Server1.
Server1 send request to Server2.
Request are xmlHTTPRequest - need to get data (XML) from Server2 back to client.
Trying to use APACHE proxy...

Anyone can help?
What to download / configure / ...?
Thank you for your help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Apache Rewrite help!

I am trying to write RewriteRule on Apache_1.3.26 to get users web page from another server. for example if users tries to get web page on www.somedomain.com/~usersname it will get the web page from www.testdomain.com/~username without redirect and users will not be aware of any redirect... (1 Reply)
Discussion started by: hassan2
1 Replies

2. Web Development

APACHE rewrite / redirect URL

Hello. I have scenario where a Client send request to Server1. Server1 send request to Server2. Request are xmlHTTPRequest - need to get data (XML) from Server2 back to client. Trying to use APACHE proxy... Anyone can help? What to download / configure / ...? Thank you for your... (2 Replies)
Discussion started by: ampo
2 Replies

3. Web Development

Apache rewrite rules.

Hi, I am new to Apache but I have requirement as follows. if the url is http://images/data1/templates/ it should redirect to http:/172.20.224.23/templates/ if the url doesn't have "data1/templates" (mean http://images/) it should redirect to http://images:8080/. I tried as below ... (3 Replies)
Discussion started by: sambadamerla
3 Replies

4. Web Development

Regex to rewrite URL to another URL based on HTTP_HOST?

I am trying to find a way to test some code, but I need to rewrite a specific URL only from a specific HTTP_HOST The call goes out to http://SUB.DOMAIN.COM/showAssignment/7bde10b45efdd7a97629ef2fe01f7303/jsmodule/Nevow.Athena The ID in the middle is always random due to the cookie. I... (5 Replies)
Discussion started by: EXT3FSCK
5 Replies

5. Red Hat

Need some help on tomcat URL rewrite or mod_jk

I am trying to remove the context name from the url of my server. Current URL - http://www.domainname.com/MyApp/ What I need to make is to make it avaialble at - http://www.domainname.com/ I have already tried couple of things like below - RewriteEngine On RewriteCond... (0 Replies)
Discussion started by: rockf1bull
0 Replies

6. UNIX for Advanced & Expert Users

Apache rewrite rule help needed

Hi All, I want to redirect from http://localhost/abc/xyz/def?cc=dk&lc=da to http://localhost/abc/mnc/pdf?cc=dk&lc=da. Please suggest a rewrite rule. (0 Replies)
Discussion started by: jagnikam
0 Replies

7. Web Development

Append query string via URL rewrite in apache

Hi, Googled around but I couldn't find anything similar. I'm looking to do the following in apache.. if a user comes into the following URL. http://www.example.com/some/thing.cid?wholebunch_of_stuff_here keep the URL exactly as is BUT add &something at the very end of it. thanks in... (1 Reply)
Discussion started by: kmaq7621
1 Replies

8. Web Development

Mod_rewrite - URL rewrite based upon HTTP_REFERER

Hello, I have added following rewrite cond and rewrite rules but it does not work. RewriteCond %{HTTP_REFERER} ^http://192\.168\.1\.150/categories/.*$ RewriteRule ^(.*)$ http://www.blahblah.com/ When I hit url : http://192.168.1.150/categories/881-Goes?page=7 in my browser - it... (2 Replies)
Discussion started by: ashokvpp
2 Replies

9. Web Development

Apache rewrite/redirect parameters explanation

hi what is the meaning of the below code, please explain in details RewriteRule '^/(.*)$1$2/?' (1 Reply)
Discussion started by: raghur77
1 Replies

10. Web Development

Redirect URL containing #!

I have a Rewrite Rule that helps me redirect a page with no hindrance. I am rewriting mydomain.com/best to mydomain.com/#!/ using RewriteRule ^\/best\/? /#!/ Now I want to Rewrite mydomain.com/#!/best to (0 Replies)
Discussion started by: Junaid Subhani
0 Replies
NetSDS::App::FCGI(3pm)					User Contributed Perl Documentation				    NetSDS::App::FCGI(3pm)

NAME
NetSDS::App::FCGI - FastCGI applications superclass SYNOPSIS
# Run application MyFCGI->run(); 1; # Application package itself package MyFCGI; use base 'NetSDS::App::FCGI'; sub process { my ($self) = @_; $self->data('Hello World'); $self->mime('text/plain'); $self->charset('utf-8'); } DESCRIPTION
"NetSDS::App::FCGI" module contains superclass for FastCGI applications. This class is based on "NetSDS::App" module and inherits all its functionality like logging, configuration processing, etc. CLASS API
new(%params) - class constructor Normally constructor of application framework shouldn't be invoked directly. cgi() - accessor to CGI.pm request handler my $https_header = $self->cgi->https('X-Some-Header'); status([$new_status]) - set response HTTP status Paramters: new status to set Returns: response status value $self->status('200 OK'); mime() - set response MIME type Paramters: new MIME type for response $self->mime('text/xml'); # output will be XML data charset() - set response character set if necessary $self->mime('text/plain'); $self->charset('koi8-r'); # ouput as KOI8-R text data($new_data) - set response data Paramters: new data "as is" $self->mime('text/plain'); $self->data('Hello world!'); redirect($redirect_url) - send HTTP redirect Paramters: new URL (relative or absolute) This method send reponse with 302 status and new location. if (havent_data()) { $self->redirect('http://www.google.com'); # to google! }; cookie() - Paramters: Returns: This method provides..... headers($headers_hashref) - set/get response HTTP headers Paramters: new headers as hash reference $self->headers({ 'X-Beer' => 'Guiness', ); main_loop() - main FastCGI loop Paramters: none This method implements common FastCGI (or CGI) loop. set_cookie(%params) - set cookie Paramters: hash (name, value, expires) $self->set_cookie(name => 'sessid', value => '343q5642653476', expires => '+1h'); get_cookie(%params) - get cookie by name Paramters: cookie name Returns cookie value by it's name my $sess = $self->get_cookie('sessid'); param($name) - CGI request parameter Paramters: CGI parameter name Returns: CGI parameter value This method returns CGI parameter value by it's name. my $cost = $self->param('cost'); url_param($name) - CGI request parameter Paramters: URL parameter name Returns: URL parameter value This method works similar to param() method, but returns only parameters from the query string. my $action = $self->url_param('a'); http($http_field) - request HTTP header Paramters: request header name Returns: header value This method returns HTTP request header value by name. my $beer = $self->http('X-Beer'); https($https_field) - request HTTPS header This method returns HTTPS request header value by name and is almost the same as http() method except of it works with SSL requests. my $beer = $self->https('X-Beer'); raw_cookie() - get raw cookie data Just proxying "raw_cookie()" method from CGI.pm user_agent() - User-Agent request header my $ua_info = $self->user_agent(); request_method() - HTTP request method if ($self->request_method eq 'POST') { $self->log("info", "Something POST'ed from client"); } script_name() - CGI script name Returns: script name from CGI.pm path_info() - get PATH_INFO value if ($self->path_info eq '/help') { $self->data('Help yourself'); } remote_host() - remote (client) host name warn "Client from: " . $self->remote_host(); remote_addr() - remote (client) IP address Returns: IP address of client from REMOTE_ADDR environment if ($self->remote_addr eq '10.0.0.1') { $self->data('Welcome people from our gateway!'); } _set_req_cookies() - fetching request cookies (internal method) Fetching cookies from HTTP request to object "req_cookies" variable. EXAMPLES
See "samples" catalog for more example code. SEE ALSO
CGI, CGI::Fast, NetSDS::App AUTHOR
Michael Bochkaryov <misha@rattler.kiev.ua> LICENSE
Copyright (C) 2008-2009 Net Style Ltd. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA perl v5.10.1 2010-04-28 NetSDS::App::FCGI(3pm)
All times are GMT -4. The time now is 09:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy