I have addresses like the ones below that are all related to one product :


http://a.net/skins/them-black/p214-l...titlehere.html
http://a.net/skins/them-black/p214-l...elongtitlehere
http://a.net/longtitleherelongtitleh...titlehere.html
http://a.net/skins/them-black/p214
http://a.net/them-black/p214
http://a.net/them-black
http://a.net/p214
http://a.net/skins


I wanted to write a code to process all of them, I used the following method in htaccess file :


RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ index.php?keys=$1 [NC,QSA]


in index.php i used this line in header too :


<base href="/">


and some commands for check parameters like as :


$params = explode( "/", $_GET['keys'] );


but still my images, styles and script files are not loaded , the reason is clear because it seems that all the requests go to the index.php , how can I solve this problem while I have also used the base commands in header and htaccess.


If I need to write a better code, what code can cover that example without causing problems in loading the resources files (css,images,js files)?