Centralized Redirection file

X

Xero

Hello.
Is there anyway I can write a script in Perl that redirects users to
different pages based on the link they clicked?

For example, in a file (let's say a *.pl file), there is a group of
pre-defined commands and their respective location.

Command | Destination
---------------------------------------
index | default.htm
products | products.htm
about | about.htm
download | download.htm
contact | contact.htm
-----------------------------------------

Then when a hyperlink containing the command 'index'
(i.e. redirect.pl?command=products (or something like that), then the
visitor will be redirected to products.htm.

Similarly, when the command is 'contact' (redirect.pl?command=contact), then
the visitor will be redirected to contact.htm.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top