Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have set up a server that is a clone of our production server that we want to use as a test server for testing our redirector. Importantly, we don't want to actually redirect to these urls like we do on our production machine. Instead we just want to redirect to a page that displays in text what the url would have been.

Currently, functions exactly like the production server, i.e. it redirects you to the desired url. For reasons I won't go into, we don't want it to do this on the test server, instead we just want it display what the redirect url would have been.

The box is a fedora box, and most of the redirector scripts are written in python. Ideally, I would simply write a python script to complete this task.

Note initially, I was redirecting to a non local url. The whole function of the box was to serve as a redirector and it has no native web interface. I will have to create that web infrastructure myself.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Can you just make the url that it would have went to a URL parameter of some page

ex: Instead of actually redirecting to www.website.com/page1 you would redirect to www.website.com?redirect=page1

share|improve this answer
    
That is exactly what I need to do. However, I am very new to this, how would I rewrite a redirect rule that achieves this function. And then how and where (I assume /var/www) would I write the page and script that prints out this param? –  Peter Dec 6 '11 at 18:10
    
Note initially, I was redirecting to a non local url. The whole function of the box was to serve as a redirector. –  Peter Dec 6 '11 at 18:12
    
How does that normal redirection happen? –  ckliborn Dec 6 '11 at 18:20
    
In a .common file which delineates a set of redirect rules, for example: RewriteMap servers prg:/etc/httpd/conf.d/test.py –  Peter Dec 6 '11 at 18:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.