.htaccess - How can i rewrite rule from link a to link b htaccess -


i need rewrite

 http://localhost.com/cat1/test2/  

to

 http://localhost.com/blog/cat/cat1/post/test2/ 

but 404 error page. rewrite index.php success can't rewrite link above

here rule write in .htaccess dont' work :

rewriterule ^/blog/cat1/test2/$ blog/cat/cat1/post/test2/ 

how can do.

thanks.

cat1/test2/ , blog/cat1/test2/ not same thing, reason why didn't work.

use rule instead:

rewriterule ^cat1/test2/$ /blog/cat/cat1/post/test2/ [l] 

however, if typo, , left out blog, add blog/ before cat1/ @ beginning.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -