regex - htaccess rewrite URL and remove GET parameters -
i new url rewrite, regex , .htaccess
here issue facing:
i have url parameter: www.mysite.in/alpha-beta/abc.php?id=apple%strike=200.00
i want display like: www.mysite.in/alpha/beta/apple/200.00
this code in .htaccess:
rewriterule ^alpha/beta/(.*)/([0-9]+(\.[0-9]+))$ alpha-beta/abc.php?id=$1&strike=$2 [nc,l]
but blank page when go url: www.mysite.in/alpha/beta/apple/200.00
when change htaccess rule to:
rewriterule ^alpha/beta/(.*)/([0-9]+(\.[0-9]+))$ http://www.mysite.in/alpha-beta/abc.php?id=$1&strike=$2 [nc,l]
it redirects correct page url displayed http://www.mysite.in/alpha-beta/abc.php?id=apple&strike=200.00
what seems problem?
use these rules in root .htaccess:
rewriteengine on rewriterule ^oi_tool/iv/(.*)/([0-9]+(?:\.[0-9]+))/?$ oi_analysis_tool/iv_chart.php?symbol=$1&strike=$2 [nc,l,qsa] # fix path getiv.php redirecting /oi_analysis_tool/ rewriterule ^oi_tool/.+?/(getiv\.php)$ /oi_analysis_tool/$1 [l,nc,r=301]
Comments
Post a Comment