htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Use htaccess to hide mailto links
PostPosted: 22 Feb 2007 19:30 
Offline
User avatar

Joined: 25 Sep 2006 04:48
Posts: 242
Create a mail directory, and make an .htaccess file there with the following code:


Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
   
# With subject - mail/domain/com/user/subject
RewriteCond %{REQUEST_URI} ^/mail/(.*)/(.*)/(.*)/(.*)$
RewriteRule ^.* mailto:%3@%1.%2?subject=%4 [R,L]
   
# No subject - mail/domain/com/user
RewriteCond %{REQUEST_URI} ^/mail/(.*)/(.*)/(.*)$
RewriteRule ^.* mailto:%3@%1.%2 [R]



Now to create a mailto link use the following format:

Code:
http://s.com/mail/quan/com/tom => equals tom@quan.com
or
http://s.com/mail/quan/com/tom/test  => equals tom@quan.com with the subject "test"


The email address never really shows up on the web page, so harvesters will miss it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB