Here is my old rewrite rule.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([a-zA-Z0-9\-_]+)$ /index.php?name=$1 [L]
</IfModule>
The old rule works great but I wanted to add the ability for users to use have periods in the url. For example, in the following URLs periods seem to make the most sense:
en.opensuse.org/OpenSUSE_11.2
instead of en.opensuse.org/OpenSUSE_11_2
or
en.wikipedia.org/wiki/Mac_OS_X_v10.1
instead of en.wikipedia.org/wiki/Mac_OS_X_v10_1
As you can see, having periods in the URL makes for a more readable URL.
I added a period to the rule and now I receive an Internal Server Error.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([a-zA-Z0-9\-_.]+)$ /index.php?name=$1 [L]
</IfModule>
I've also tried escaping the period, but have also had no luck with that.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([a-zA-Z0-9\-_\.]+)$ /index.php?name=$1 [L]
</IfModule>
If somebody could please let me know what I'm doing wrong and how to correct the problem it would be greatly appreciated.