mod_rewrite illegal characters
Posted: Sat Jul 04, 2009 5:25 pm
I've set up a CMS system using mod_rewrite, but have run into a small problem. If the user enters, for the 'url name' (http://thesite.com/urlname/) certain invalid characters, the .htaccess file is screwed and the whole website stops working (as expected). I'm going to put in a check to make sure the user cannot enter invalid characters, but which characters are illegal in the .htaccess file? The file looks like this:
where the names in the brackets are automatically written by a php function every time a page is updated. The 'Auto and Marine' causes the problem. So, does anyone have a list of invalid characters? Does it follow the same rules as a URL? Any help is appreciated.
Code: Select all
RewriteRule ^(products|about|testimonials|services|residential|commercial|Auto and Marine Services|tips)/$ /~kcslocks/pages.php?calling=$1