This is sort of a continuation of this thread, except that I gave up on ever finding the httpd.conf file on my computer. I did manage to access my ONLINE httpd.conf file and modify it, adding this code:
RewriteMap tolower int:tolower
I then restarted my server. Next, I modified an .htaccess file, adding this code:
RewriteMap lc int:tolower
RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R]
I then visited a webpage - MySite/Topics/This_Article - and got an Internal Server Error message. (I verified that it was working before I published the .htaccess file.)
So I restored the .htaccess file, deleting the new code and publishing it online. Now I get a NOT FOUND error. In fact, it appears that ALL the child pages on the site are now dead. (The static pages - like MySite/Topics - still work.)
I tried the same experiment on another website with the same results. The modified .htaccess file gives me an Internal Server Error, and when I restore the .htaccess file, all the dynamically generated child pages display a Not Found error.
Maybe part of the problem is that I haven’t yet replace the URL’s with lower case URL’s in my database. So, if the URL’s or database are case sensitive, then the page might not display with capital letters OR lower case. However, it’s odd that none of my pages work, even after I restored the .htaccess files. Also, I thought the new code I added was supposed to make the URL’s change by default. In other words, if I type in MySite/Topics/This_Article, it should change to mysite/topics/this_article - whether there’s an article at that address or not. At least, that’s what I thought.
Below is a copy of my entire modified .htaccess file.
Thanks for any tips.
RewriteEngine On
RewriteRule ^test\\.htm$ test.php [L]
Options -MultiViews
# php_value magic_quotes_gpc 0
php_flag magic_quotes_gpc Off
RewriteMap lc int:tolower
RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R]
ErrorDocument 404 /404.php
RewriteRule ^/([a-zA-Z0-9()_/-]+)/?$ index.php?home=$1 [L]
RewriteRule ^topics/([a-zA-Z0-9()_/-]+)/?$ topics/index.php?topic=$1 [L]
RewriteRule ^world/([a-zA-Z0-9()_/-]+)/?$ world/index.php?area=$1 [L]
RewriteRule ^people/([a-zA-Z0-9()_/-]+)/?$ people/index.php?ppl=$1 [L]
RewriteRule ^orgs/([a-zA-Z0-9()_/-]+)/?$ orgs/index.php?org=$1 [L]
RewriteRule ^essays/([a-zA-Z0-9()_/-]+)/?$ essays/index.php?ess=$1 [L]
RewriteRule ^exposes/([a-zA-Z0-9()_/-]+)/?$ exposes/index.php?exp=$1 [L]
RewriteRule ^revolt/([a-zA-Z0-9()_/-]+)/?$ revolt/index.php?rev=$1 [L]
RewriteRule ^glossary/([a-zA-Z0-9_/-]+)/?$ glossary/index.php?glos=$1 [L]
RewriteRule ^reference/([a-zA-Z0-9()_/-]+)/?$ reference/index.php?ref=$1 [L]
RewriteRule ^about/([a-zA-Z0-9_/-]+)/?$ about/index.php?about=$1 [L]