WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Cut half of your htaccess if using clean URLs
Conditional trailing slashes

Version: 3.12
printPrint


Cut half of your htaccess if using clean URLs
rbl
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: Portugal
Total Topics: 19
Total Posts: 39
Posted 10/13/04 - 11:58 PM:
quote post
#1
If you add a question mark to the trailing slash before $ you will make it conditional, meaning, it might have or not a trailing slash so please do either, mr Apache.

Here's an example:
RewriteRule ^link/([0-9]+)/?$ link.php?id=$1 [L]
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6339
Posted 10/14/04 - 06:27 AM:
quote post
#2
Thanks, I'll try that.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.