Daleeburg Posted September 24, 2007 Share Posted September 24, 2007 ok i realize this is not php, but i am using it on a php site and a regex is a regex right? I am looking into creating a file protection the only problem is that i can not get this working again. the address looks like this www.domain.com/file_man/files/2/items.txt This does not work RewriteEngine On Options +FollowSymLinks # Rewrite /file_man/files/xxxx/yyyy.zzz to test.php?file=yyyy&type=zzz&user=xxxx RewriteRule ^file_man/files/([^/]+)/([^\.]+)\.([^/]+)$ /file_man/test.php?file=$2&type=$3&user=$1 [NC,L] This does work RewriteEngine On Options +FollowSymLinks # Rewrite /file_man/files/yyyy.zzz to test.php?file=yyyy&type=zzz& RewriteRule ^file_man/files/([^\.]+)\.([^/]+)$ /file_man/test.php?file=$1&type=$2 [NC,L] the only difference it he third variable which should be a number, any thoughts? ~d Quote Link to comment https://forums.phpfreaks.com/topic/70480-regex-in-htaccess/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.