change the structure of the url with mod_rewrite

advertisements

For a new site we are developing, the URL structure is as follows.

After everything is finished, now the *client wants to change the URL structure as follows

How can i change this as per his requirements with mod_rewrite / htaccess? I am not an expert with htaccess and its not possible for us to change the platform now.


Try something like this:

RewriteEngine on
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ $1?$2/$3 [L,QSA]
RewriteRule (.*?)/?$ index.php?$1 [L,QSA]