gkbk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Perl Monks,

I am a newbie in Perl, Apache. On Apache (using XAMPP), I am trying to rewrite URIs in .htaccess file as follows:

RewriteEngine On<br> RewriteRule ^index.html$ about.html #this works<br> Redirect 301 ^index.html$ about.html #this does not work<br> RewriteRule ^http://localhost/sample/prog.pl?q=param:A;pageoffset=10$ +http://localhost/sample/prog.pl?q=param:B;pageoffset=20 #this does no +t work<br><br>
I am not sure what the mistake is for the two rewrites that don't work, as shown above. Please advise.

Thanks for this super cool wesbite!

Replies are listed 'Best First'.
Re: rewriting of URIs (mod_rewrite mod_alias)
by Anonymous Monk on Mar 12, 2014 at 00:01 UTC
      Thanks Anonymous Monk for those links. They were helpful, but still I am unable to solve my problem. I tried as follows:
      RewriteRule ^http\:\/\/localhost\/sample\/prog\.pl\?q\=param\:A\;pageo +ffset\=10$ http://localhost/sample/prog.pl?q=param:B;pageoffset=20 RewriteRule ^prog\.pl\?q\=param\:A\;pageoffset\=10$ prog.pl?q=param:B; +pageoffset=20
      After this, when I open page 'http://localhost/sample/prog.pl?q=param:A;pageoffset=10' in the browser, I get the content of this same page and not the page that is intended/directed (i.e. http://localhost/sample/prog.pl?q=param:B;pageoffset=20). Any suggestions? Thanks again.