Views url paths not using proper url on localhost When running site on localhost and using field rewrite I construct a link like this for example

&lt;a href="/[uid]/addresses/shipping/default/[profile_id_1]"&gt;Set as default&lt;/a&gt;


I get a path that is not proper. Something like this

http://localhost/1/addresses/shipping/default/284 


and it is missing a site part in url and should be like

http://localhost/MY-SITE/1/addresses/shipping/default/284


I have set a $base_url in settings.php but doesnt help. When I put site online this works fine, but what should I do for localhost?
You need to alter your .htaccess file:

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal