also set page variable on .php pages
also parse img links for relative links and replace with full path