As best as I can tell from both your rule and your logs, it should work. It seems like there must be something else going on… other htaccess code, or other changes in your main configuration.
You can try to post everything that might be a factor, or… the way I troubleshoot these kinds of things is to restore my config to its original defaults, then add my changes back one by one until I discover the part that’s making things behave badly.
Okay, so adding RewriteBase /mysite to my .htaccecss allows it to work, is there a better alternative? I really don’t want that inside my htaccess (as I have two different environments with two different base names).
So I’m learning a lot this afternoon, it seems because I used Alias, I need RewriteBase (somewhere in the Apache documentation is the following, though I never found it, I did find this quote elsewhere on the web though)
This directive is required when you use a relative path in a substitution in per-directory (htaccess) context unless either of the following conditions are true:
The original request, and the substitution, are underneath the DocumentRoot (as opposed to reachable by other means, such as Alias).
The filesystem path to the directory containing the RewriteRule, suffixed by the relative substitution is also valid as a URL path on the server (this is rare).
As previously mentioned, in other contexts, it is only useful to make your rule shorter. Moreover, also as previously mentioned, you can achieve the same thing by placing the htaccess file in the subdirectory.
So now I need to figure out a different way of doing my development without Alias I was going to use VirtualHost, but I keep seeing warnings, that VirtualHost is going away…
Back at your first post, you’re asking [a-z]+ to match pageName. If pageName is a pseudonym of a lowercase pagename, then it should match, otherwise, you’ve either got to match pagename OR change the character range definition to [a-zA-Z]+. What’s the test URI you’re using (if not /pageName as you’d written)?
I didn’t spend much time on the rest after that likely oversight.
No, I used all lowercase for my URL testing. Ended up being the use of Alias directive with Directory requires you to use RewriteBase for your RewriteRules. I’m still trying to figure out how to get around that (hoping a new day will help with that :)).