.htaccess - htaccess: Rewrite second part of url having "view_retailer" to "view-retailer" -
i trying change url from
http://www.dev.example.in/view_retailer/ebay-in
to
http://www.dev.example.in/view-retailer/ebay-in
here rules, , these rules not working.
rewriteengine on rewriterule ^view-retailer/(.*)$ /view_retailer/$1 [r=302,ne,l]
there many urls having "view_retailer" in common, , want rename them "view-retailer". can please me out rename url http://www.dev.example.in/view_retailer/ebay-in http://www.dev.example.in/view-retailer/ebay-in
i have tried re-write url in http://htaccess.mwl.be/, please have on following image
what doing wrong? please let me know answer.
thanks in advance
finally got solution question.
rewriteengine on rewriterule ^view_retailer/(.*)/$ /view-retailer/(.*)/ [l]
or
rewriterule view_retailer/(.*) http://www.example.in/view-retailer/$1 [r=301,l,qsa]
here following code tested , running on http://htaccess.mwl.be/
Comments
Post a Comment