Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2006
    Thanked 0 Times in 0 Posts

    mailto link displaying "localhost" when used from htaccess file


    I was hoping to hide my mailto links in the htaccess file and it seemed to be working perfectly however I figured out today it's doing something weird. When you hit on the email link, the email address in the to box is xxx@xxx.comlocalhost/

    It appends this weird "localhost/" to the end of the email address and I have no clue why! My option to get around it is to redirect to a PHP file that headers to the mailto link but I was hoping to keep it in my htaccess and nice and tidy.

    RewriteRule ^contact/email$ mailto:xxx@xxx.com.au [L]
    Hopefully you can help me =)


  • #2
    New Coder
    Join Date
    Mar 2010
    Virginia, USA
    Thanked 5 Times in 5 Posts

    Odd - Not sure where to start with this one. I setup the same rewrite rule on my domain and I'm not getting the behavior you are experiencing. Try it out and let me know what it does for you.

    If you still get the appended localhost - it is likely something occurring on your local network/computer. If you don't then it's a setting somewhere on the server.

    I assume that a mailto link hard-coded in HTML served from your server doesn't append the locahost text? It sounds like that's what you are doing with the PHP file.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts