I am trying to convert links to my applications, so a link like this:
http:
converts to this:
http:
so far I could do this using:
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /index.php?id=$1&category=$2&title=$3 [QSA,L]
but this completely breaks links to css and other files as it redirects every request with a request to index.php
so I changed it a bit so that it only starts when the first request is a number:
RewriteEngine On
RewriteRule ^([0-9]*)/([^/]*)/([^/]*)$ /index.php?id=$1&category=$2&title=$3 [QSA,L]
this file does not break css and js files, however, when you go to a link, for example http://localhost/13/cat/test, try switching to another link, for example http://localhost/19/Uncategorized/something , clicking on it inside the previous page will instead redirect you to something likehttp://localhost/13/Uncategorized/19/Uncategorized/just-a-test
How to achieve what I described without any of these strange side effects?