Forum Moderators: phranque
http://www.example.com/search/?sku=12345&lot=ABCD --> https://www.test.com/docseaRch/Index.Html#/Search/12345/Abcdredirect based off the below rewrite block. Any suggestions on what I'm missing?
RewriteCond %{REQUEST_URI} search
RewriteCond %{QUERY_STRING} sku=(.*)&lot=(.*)
RewriteRule ^.* https://www.test.com/docsearch/index.html#/search/%1/%2 [NE,R=301,L] [Tue Feb 17 14:02:44.931443 2015] [rewrite:trace4] [pid 13051:tid 139869830227712] mod_rewrite.c(475): [client 1.1.1.1:59725] 1.2.3.4 - - [www.example.com/sid#2618900][rid#7f35e0002970/initial] RewriteCond: input='/search/' pattern='search' => matched
[Tue Feb 17 14:02:44.931507 2015] [rewrite:trace4] [pid 13051:tid 139869830227712] mod_rewrite.c(475): [client 1.1.1.1:59725] 1.2.3.4 - - [www.example.com/sid#2618900][rid#7f35e0002970/initial] RewriteCond: input='sku=12345&lot=ABCD' pattern='sku=(.*)&lot=(.*)' => matched
[Tue Feb 17 14:02:44.931526 2015] [rewrite:trace2] [pid 13051:tid 139869830227712] mod_rewrite.c(475): [client 1.1.1.1:59725] 1.2.3.4 - - [www.example.com/sid#2618900][rid#7f35e0002970/initial] rewrite '/search/' -> 'https://www.test.com/docsearch/index.html#/search/12345/ABCD'
[Tue Feb 17 14:02:44.931546 2015] [rewrite:trace2] [pid 13051:tid 139869830227712] mod_rewrite.c(475): [client 1.1.1.1:59725] 1.2.3.4 - - [www.example.com/sid#2618900][rid#7f35e0002970/initial] explicitly forcing redirect with https://www.test.com/docsearch/index.html#/search/12345/ABCD
[Tue Feb 17 14:02:44.931562 2015] [rewrite:trace1] [pid 13051:tid 139869830227712] mod_rewrite.c(475): [client 1.1.1.1:59725] 1.2.3.4 - - [www.example.com/sid#2618900][rid#7f35e0002970/initial] redirect to https://www.test.com/docsearch/index.html#/search/12345/ABCD?sku=12345&lot=ABCD [REDIRECT/301]
[edited by: phranque at 8:10 pm (utc) on Feb 17, 2015]
[edit reason] unlinked URLs [/edit]
RewriteCond %{REQUEST_URI} search
RewriteCond %{QUERY_STRING} sku=(.*)&lot=(.*)
RewriteRule ^.* [test.com...] [QSD,NE,R=301,L]
I'm used to 2.2 and found using the ? at the end of the destination URL does the same thing as the QSD option in 2.4.
since the QSA option is available