Hi Richard,
Thanks for your input.
Below is my .htaccess file. It is located in my document root (i.e. the base directory of my web site). Lessons is a subdirectory off my document root but for the life of me I can't get the .htaccess file inside the document root to process url's with the directory name in them.
Maybe I have to have a seperate .htaccess file inside the lessons directory. Don't know. I guess I have just been assuming that the .htaccess found in the document root is applicable to all subdirectories too. At least that is what the Apache documentation says.
- Code: Select all
RewriteEngine on
# Doesn't work with "http://domain.local/lessons/about-me"
RewriteRule /lessons/about-me$ index.php?content=about-me [E=RULE:1,L]
# Doesn't work with "http://domain.local/lessons/about-me"
RewriteRule ^lessons/about-me$ index.php?content=about-me [E=RULE:2,L]
# Works with "http://domain.local/about-me"
RewriteRule ^about-me$ index.php?content=about-me [E=RULE:3,L]
# Doesn't work with "http://domain.local/about-me"
RewriteRule ^/about-me$ index.php?content=about-me [E=RULE:4,L]
# Works...SPECIAL_PATH found in PHP $_SERVER array.
#SetEnv SPECIAL_PATH /foo/bin
# Works...locally_linked found in PHP $_SERVER array.
#SetEnvIfNoCase Referer "^$" locally_linked=1
ErrorDocument 403 /index.php?id=page-not-viewable
ErrorDocument 404 /index.php?id=page-not-viewable
ErrorDocument 405 /index.php?id=page-not-viewable
ErrorDocument 500 /index.php?id=page-not-viewable
The only one that works is the one that creates the env RULE equal to 3.
In other words if I type "http://domain.local/about-me" into the address bar of my browser only that line works. Now obviously the first two RewriteRules wouldn't work with that line either but when I type their particular URL's into the browser they don't work either.
Any insight on this Richard would be appreciated. I have spent hours trying to figure this out and have hit a solid wall.
My goal is to create an env variable that will allow my PHP scripts to determine what the navigation links showing up on page are so that global pages (which reside in my root base directory) called from any page on my site will not result in the home set of navigation links showing up but in the local links that are showing up on the page where the link was clicked.
Carlos