Hello. RewriteRule ^users/([A-Za-z0-9-]+)+$ /file.php?uname=$1 Code (markup): how can i modify that to allow a space? I've tried the following (added space) but I get a "Internal Server Error" : RewriteRule ^users/([A-Za-z0-9- ]+)+$ /file.php?uname=$1 Code (markup): Should be fairly simple answer. Thank you for your time.
Hi, thanks for the reply! RewriteRule ^users/([A-Za-z0-9-\s]+)+$ /file.php?uname=$1 Code (markup): Like that? Internal server error again..
Remove the last + sign.... whether or not it's causing the error, it's useless. + means "one or more", but the only thing being repeated is the [A-Z...] which already has a + after it. Let me know if that solves anything.
RewriteRule ^users/([A-Za-z0-9-\s]+)$ /file.php?uname=$1 Code (markup): Thanks, removed that. Still same error though.
getting closer Now I get a "Not Found 404"... The browser replaces the space with a %20 if that makes a difference. Thanks for you help!!
ahh that works. Thanks. Although, I would like to limit the input. I guess until i find a solution for the other way I'll just do a little PHP validation.
RewriteRule ^users/([^.]+)$ /file.php?uname=$1 [L] (.*) is anything. ([^.]+) is more limited, but I'm not sure if it would work with a space.
I am trying to change redirect url1 to url2 url1 = http://localhost/ad/profile/2/Vasim Padhiyar/ url2 = http://localhost/ad/public_profile.php?id=2&name=Vasim Padhiyar i am using following code RewriteRule ^profile/(.*)/(.*)/$ public_profile.php?id=$1&name=$2 [L] Code (markup): The code only works if i type following url url1 = http://localhost/ad/profile/2/Vasim/ Any idea ? Thanks in advance.