I'm sure this is easy, but I am new to mod_rewrite and am getting lost in the various posts.
1. I want users to have nice-looking URLs:
mysite.com/niceName1/niceName2 to rewrite to mysite.com/index.php?one=niceName1&two=niceName2
2. I do this in .htaccess as follows:
RewriteEngine on
RewriteRule ^([^./]*)/([^./]*)$ /index.php?one=$1&two=$2 [L]
3. But in index.php I have <script src="assets/myfile.js"> which results in a 404 error since this URL becomes /niceName1/assets/myfile.js
4. The mod_rewrite log file shows that 'add path info postfix' is adding the $1 pattern from step2.
How can I prevent this?
Thank you so much anyone who can help a mod_rewrite beginner.