I am trying to make a PHP wiki for my own use, and have an Apache mod_rewrite rule to make /Main_Page go to /index.php?title=Main_Page
The code is below:
RewriteRule ^([a-zA-Z0-9]+)$ /index.php?title=$1
RewriteRule ^([a-zA-Z0-9]+_?[a-zA-Z0-9]+)$ /index.php?title=$1
RewriteRule ^([a-zA-Z0-9]+_?[a-zA-Z0-9]+_?[a-zA-Z0-9]+)$ /index.php?title=$1
RewriteRule ^([a-zA-Z0-9]+_?[a-zA-Z0-9]+_?[a-zA-Z0-9]+_?[a-zA-Z0-9]+)$ /index.php?title=$1
However, I am stuck on something. I’d like the [a-zA-Z0-9] part to accept any character, not just alphanumeric ones.
Is this possible? If so, how would I manage to do it?
A period will match any character except a newline.