Click here to Skip to main content
15,306,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

On my web server, running Apache, I want to include a RewriteRule statement in the .htaccess file, that allows to forward the user to a "mailto" link.

What I have so far is the follwoing:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|de)/sendmail/(.*)$ mailto:$ [R=301,L]

That works pretty fine; when the user navigates to the email client opens with "" as the recipient's email.
The only thing is, that the browser window now states "Permanently moved", which is not what should appear.

Is there any chance, to open the email client and to navigate to e.g.

Thanks in advance.

What I have tried:

As already stated in the question, I tried using the RewriteRule and RewriteCond settings, shown above.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900