Hi I have just started tinkering with mod_rewrite and am having difficulties with relative links. I understand that I can make all links absolute which takes away any problems but I would prefer not to do it this way. I have tried writing a rule that rewrites all files and sub-folders back to the root. I feel I am going around in circles, any help would be great! This is what I have so far. The top two lines work. I just need to add another that rewrites for example: /training/course/dermal/<anything> to /<anything> RewriteRule ^popup/([A-Z,a-z,0-9]+)/([A-Z,a-z,0-9]+)/$ pop-up.php?$1=$2 RewriteRule ^training/([A-Z,a-z,0-9]+)/([A-Z,a-z,0-9,_,&]+)/$ training_auto.php?$1=$2 Code (markup): Thanks Anthony