Simple rule

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Wed Mar 26, 2008 9:43 am    Post subject: Simple rule Reply with quote

Hello all,

I need a simple rule making for me. I'm useless at URL re-writing. I've tried for hours with no usable result.

Basically, when someone goes to www.domain.com/mail i want it to redirect to www.anotherdomain.com/webmail.

The current one works but it will do it whenever the word "mail" is present in any part of the URL, which is causing problems with some scripts.

Any help is appriciated.

Andy
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
roganty
-


Joined: 08 Jun 2004
Posts: 357
Location: Bristol, UK

PostPosted: Wed Mar 26, 2008 1:11 pm    Post subject: Reply with quote

AbyssUnderground,

I take it you have tried the following variations
Quote:

^/mail$
^mail$

^/mail/$
^mail/$

^/mail/?$


the ^ means start of line
the $ means end of line
_________________
Anthony R

Roganty
| Links-Links.co.uk
Back to top View user's profile Send private message Visit poster's website
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Wed Mar 26, 2008 1:12 pm    Post subject: Reply with quote

No I haven't. Like I said I am useless with URL Rewriting.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
roganty
-


Joined: 08 Jun 2004
Posts: 357
Location: Bristol, UK

PostPosted: Wed Mar 26, 2008 1:20 pm    Post subject: Reply with quote

AbyssUnderground wrote:
No I haven't. Like I said I am useless with URL Rewriting.


It's just a bit like regular expressions... but if your useless with them as well... lol :->
_________________
Anthony R

Roganty
| Links-Links.co.uk
Back to top View user's profile Send private message Visit poster's website
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Wed Mar 26, 2008 8:32 pm    Post subject: Reply with quote

You could always be lame like me and just make the webmail folder, stick a index.php file in it with header('Location: http://website.com/mail/');. That's what I do. :P
_________________
-Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados.


Last edited by rrinc on Wed Mar 26, 2008 8:34 pm; edited 1 time in total
Back to top View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Wed Mar 26, 2008 8:34 pm    Post subject: Reply with quote

rrinc wrote:
You could always be lame like me and just make the mail folder, stick a index.php file in it with header('Location: http://website.com/webmail/');. That's what I do. :P


Thats what I'm trying to avoid. Its for people I host so they don't have to remember the domain and path to the webmail, the /webmail will simply redirect them to it and there is no way they can remove it because a folder won't exist to do so.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
pkSML
-


Joined: 29 May 2006
Posts: 882
Location: Michigan, USA

PostPosted: Fri Mar 28, 2008 4:51 pm    Post subject: Reply with quote

As roganty said, your regex is
Code:
^/mail$


The character you're looking for is the $. It is the terminating anchor.
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB phpBB Group