FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


htaccess pattern for an email





pollux1er
Hi all, I am trying to write a patter in such a way that this link :

http://www.mysite.com/link/go/emailadress@gmail.com

is interpreted like this :

http://www.mysite.com/process.php?email=emailadress@gmail.com

But i dont know how to write. I tryied this but it is not working. Need help please.

Thanks
Marcuzzo
just forward the url to a PHP file to handle the input

use a rewrite rule for that: see the following link for more info
http://httpd.apache.org/docs/current/mod/mod_rewrite.html

something like this should do it ( just from the top of my head, haven't tested it)
Code:
RewriteRule ^(.*)$ index.php?check=$1



in the php file that will handle the request put something like
Code:
<?php

 if ( isset( $_GET['check']) )
{
   print("Received: " . $_GET['check'] );
}

?>

note that the

if you have the htaccess file in the root folder and the following url is opened:
http://www.mysite.com/link/go/emailadress@gmail.com

then the php file will print "link/go/emailadress@gmail.com"

then just explode the string and use a regular expression to capture the email address
Related topics
Which one is better email pattern
htaccess Password Protection
Password thing is realy annoying me(htaccess)
htaccess
.htaccess tutorial
[java scripts ] Multimedia
[php scripts ] phpweather&email
[ java scripts ] email service
CANT UPLOAD .htaccess, .htpasswd, .header, .footer
Fantastico could be updated
BG Xmail The World's First 10GB Email Service
[tutor] How to protect images without htaccess using PHP
.htaccess IP Blocking
Custom error pages using .htaccess
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.