I'm setting up a website that (ideally) would allow users to access other users' homepages with a url in the format "www.mysite.com/Page/ThisLanham" where 'ThisLanham' is the username. The username begins with a letter and can consists of any alphanumeric character along with an underscore, hyphen, or period.
So far, the redirection has worked perfectly when I ignore usage of the period character. The following code handles that request:
RewriteRule ^page/([a-zA-Z][0-9a-zA-Z-_]*)/?$ Page/?un=$1 [NC,L]
However, I've tried a number of ways it check for the period as well, but all have resulted in a 500 Internal Server Error. Here are some my attempts:
RewriteRule ^page/([a-zA-Z][0-9a-zA-Z-\_\\.]\*)/?$ Page/?un=$1 [NC,L]
RewriteRule ^page/([0-9a-zA-Z-\_\\.]\*)/?$ Page/?un=$1 [NC,L]
RewriteRule ^page/([a-zA-Z].\*)/?$ Page/?un=$1 [NC,L]
RewriteRule ^page/(.\*)/?$ Page/?un=$1 [NC,L]
My backup plan is to no longer allow users to include periods in their usernames, but I'd much rather find a solution. Any ideas???