1

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.

1 Answer 1

1

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

4
  • 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?
    – Spencer
    Dec 6, 2011 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.
    – Spencer
    Dec 6, 2011 at 18:12
  • How does that normal redirection happen?
    – ckliborn
    Dec 6, 2011 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
    – Spencer
    Dec 6, 2011 at 18:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .