Fix css urls rewrite in application code.

An attempt to fix #2106