0

Here's what I'd like to do:

If a user goes to www.example.com/thislocation, I'd like to redirect to a particular script and give it "thislocation" as a parameter.

So if a user navigated to www.example.com/thislocation, I'd like to redirect to www.example.com/cgi-bin/test.pl?parameter=thislocation, and similarily, if the user navigated to www.example.com/thatlocation, I'd like to redirect to www.example.com/cgi-bin/test.pl?parameter=thatlocation.

Is this possible with Apache?

1 Answer 1

1

You could achieve this by using .htaccess and the code for this is:

RewriteEngine on
RewriteRule ^(.*)$ /cgi-bin/test.pl?parameter=$1 [L] 

You must log in to answer this question.

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