I have a bunch of RewriteRules in .htaccess for SEO purposes. Sample...
RewriteEngine On
RewriteRule ^signup$ /signup.php
RewriteRule ^account$ /account.php
RewriteRule ^logout$ /logout.php
RewriteRule ^login$ /login.php
RewriteRule ^recent-questions$ /recent.php
RewriteRule ^popular-questions$ /popular.php
...
...
(more similar stuff)
...
...
RewriteRule ^(.*)/([-_~*a-zA-Z0-9]+)\|([0-9]+)(\/)?$ view.php?title=$1&id=$2&%{QUERY_STRING}
RewriteRule ^([-_~*a-zA-Z0-9]+)(\/)?$ categories.php?key=$1
The system is in a sub-folder "ask" on the server.
They all work fine if I map the folder to http://ask.mydomain.com
But I don't want to use a sub-domain since I'm adding an existing header & footer managed by other people that share resouces and contains relative links with the main www. website.
When I try to access the folder via http://www.mydomain.com/ask the RewriteRules with hyphens in them result in 404 errors - the other ones continue to work.
I've already tried escaping the hyphens as - and %2D. The former made no difference. The latter takes me to a completely incorrect page.