.htaccess - Redirect URL with RewriteRule if php url has parameters? -


I try to use the rewrite rules to get a temporary new link from an old link in my .htaccess (This is not a permanent new site, so I do not want a 301 redirect)

The following works for php pages without all html pages and parameters, but this is not the process of the previous example Instructions - Note that the php page with one of the parameters The structure of the data is different on the new domain, but the parameters of the URL are exactly the same. Can I do something with regular expressions to be able to re-write? I do not have much experience in writing my own manifestations, so I'm not sure where to start!

Mary. Htaccess file:

  AddType x-mapp-php5 .php AddHandler x-map-php5.php option -multi views option + followSymlinksRewriteEngine on RewriteRule investment /index.html http://example.org /new_file_structure/invest/index.htmlRe-rewrite rule-old.html http://example.org/index.phpRiver Rowl investment / i2 / ap / line_i2_i_ap1.php http: // example.org/new_file_structure/i2/ap /row_I2_i_ap1.php ## The following does not work: Rev. Subpage / View.php? D = i1_014 http://example.org/2010/view.php?d=i1_014  

Thanks, Jane

You need to use RewriteCond to find the query string:

  RewindCand% {QUERY_STRING} } D = (. +)  

and then you need to use % n :

  as a Recovered code backwards reverse rouge sub-page / view.php $ http://example.org/2010/view.php?d=% 1  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -