Hi Lee,
Thanks for your kind words. Back from the hospital and my wife needs special care for at least 6 weeks. Healing fine, though, so we believe all's well.
I can't believe that I left the protocol and domain in the RewriteRule after telling you that you have to remove it! Shows how I was affected.
Without access to the httpd.conf (for a RewriteMap), you'll have to hard code your capitalization problem (or simply solve it in your receiving script - if you can).
Code:
RewriteCond %{QUERY_STRING} uniquekey=SEARCH+SOFFIA+WARDY
RewriteRule ^~soffiaw5/blog/$ /~soffiaw5/blog/?s=Soffia+Wardy [L]
You cannot have the protocol (http://) or the domain (67.225.255.100) referenced in a RewriteRule (regex). Unless you have a RewriteMap (if you do, make use of the tolower built-in function), you'll have to rewrite your query string manually. Of course, this defeats your search function so either use a dedicated (or VPS) server or make the conversion in PHP.
If you can make use of tolower, you could use something like
RewriteCond %{QUERY_STRING} ([A-Z]${tolower:[a-zA-Z\ ]+})
to capitalize the first letter of the value string. I'll let you figure out how to break the query string into words and ucfirst() them with a combination of toupper and tolower if you want mod_rewrite to do the heavy lifting.
As for your WordPress code:
Code:
# BEGIN WordPress
# <IfModule mod_rewrite.c> - EVIL AND WASTEFUL!!! Test once without this then get rid of it ... FOREVER!!!
RewriteEngine On
RewriteBase /~soffiaw5/blog/
# RewriteRule ^index\.php$ - [L] - that's what the !-f does for you next!
# <= Insert the above code here and NEVER after WP's generic "redirect everything" code which follows.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? /~soffiaw5/blog/index.php [L] # I prefer to allow NO path/file
# RewriteCond %{QUERY_STRING} uniquekey=Search+Soffia+Wardy
# RewriteRule ^http://67.225.255.100/~soffiaw5/blog/$ /~soffiaw5/blog/?s=$1 [QSA,L]
# The REVISED version of this needs to come before the RewriteRule set (rule & conditions) above and after the RewriteBase
# </IfModule> - EVIL AND WASTEFUL!!!
My sincere apologies for not having my head about me in the earlier response(s).
Regards,
DK
Bookmarks