Url Rewriting regex
I have this rule in my .htaccess
RewriteRule ^([^/\.]+)/?$ ?page=user&id=$1 [L]
It rewrite a url like
The problem is that with a url with dots like http://sitename.ext/nick.name.test i get a 404 error..
I'm not good with regex..
That's because it's not being rewritten. You specificaly told it to exclude ., and that's what it's doing.
Personally, I would favour something like this:
RewriteRule user/(.+) ?page=user&id=$1 [L]
If you want to match any character except a slash, the regex is [^/], since the \. will cause it also to not match dots.
Your rule should be
RewriteRule ^([^/]+)/?$ ?page=user&id=$1 [L]
You might find this site helpful.