Maybe it will seem a very simple question, my website’s url are awfully written, so I want to rewrite them. So I am preparing to activate mod_rewrite. The question is the following:
Suppose my url switches from site_url/index.php?page=mypage&type=mytype to site_url/mypage/mytype, what will happen if one refresh the page, is it necessary to put in the .htaccess file the converse process for proceeding to rewriting ?
You need a combination of redirect and rewriting. A draft outline of URL rewriting process would be:
.php, 301/302 redirect the request to its SEO friendly version. This will change the address in browser address bar.Here is a very basic example of rewrite rules that do both of the above: