View Single Post
Old 12-03-2004, 01:46 AM   #1
leonardburton
Green Mole
 
Join Date: Dec 2004
Posts: 10
regex for trailing slashes?

Could someone please help me come up with a regex to determine if a trailing slash needs to be added to a url?

for instance http://www.whatever.com needs to become http://www.whatever.com/

and http://www.whatever.com/foo needs to be http://www.whatever.com/foo/

but http://www.whatever.com/foo.php needs to remain the same

Thanks,

Leonard
leonardburton is offline   Reply With Quote