这是我想要做的:
如果用户访问www.example.com/thislocation ,我想redirect到一个特定的脚本,并给它“thislocation”作为参数。
因此,如果用户导航到www.example.com/thislocation ,我想redirect到www.example.com/cgi-bin/test.pl?parameter=thislocation ,并且类似地,如果用户导航到www.example.com/thatlocation ,我想redirect到www.example.com/cgi-bin/test.pl?parameter=thatlocation 。
这可能与Apache?
你可以通过使用.htaccess来实现这一点,代码如下:
RewriteEngine on RewriteRule ^(.*)$ /cgi-bin/test.pl?parameter=$1 [L]