jdMorgan

msg:4017165 | 8:43 pm on Nov 1, 2009 (gmt 0) |
> However, this is resulting in a 500 Internal Server error Do you have any other working rewriterules? What is in your server error log when you get the 500 error? Jim
|
pro_seo

msg:4017383 | 6:29 am on Nov 2, 2009 (gmt 0) |
Hi Jim, I have quite a few other rewriterules as well primarily for security purposes. #MANY RFI ATTEMPTS USE THE WWW PERL LIBRARY FOR THE SCRIPT AND THIS ATTEMPTS TO BLOCK THEM RewriteCond %{HTTP_USER_AGENT} libwww-perl [NC] RewriteRule ^.*$ - [F] #PREVENT HTTP QUERY STRING RewriteCond %{QUERY_STRING} ^.*=(ht¦f)tp\://.*$ [NC] RewriteRule .* - [F,L] #BLOCK ACCESS TO WP-INCLUDES RewriteRule ^(wp-includes)\/.*$ ./ [NC,R=301,L] |
| ....and another one for URL rewrite # BEGIN WordPress <IfModule mod_rewrite.c> RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress |
| Please let me know what other information you need from me to sort this out. Thanks again as usual :)
|
jdMorgan

msg:4017614 | 5:41 pm on Nov 2, 2009 (gmt 0) |
Please address my second question above. Thanks. Jim
|
pro_seo

msg:4017623 | 6:15 pm on Nov 2, 2009 (gmt 0) |
| Please address my second question above. Thanks. |
| This is all I can get Jim [02/Nov/2009:12:03:21 -0600] "GET / HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12 GTB5 (.NET CLR 3.5.30729)" [02/Nov/2009:12:03:21 -0600] "GET /favicon.ico HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12 GTB5 (.NET CLR 3.5.30729)" [02/Nov/2009:12:03:24 -0600] "GET /favicon.ico HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12 GTB5 (.NET CLR 3.5.30729)" |
| Hope this helps! Thanks
|
jdMorgan

msg:4017718 | 7:55 pm on Nov 2, 2009 (gmt 0) |
That's a snippet from your access log. What is in your error log? If necessary, ask your host, as proceeding further will be quite difficult without that information. Jim
|
pro_seo

msg:4018016 | 8:14 am on Nov 3, 2009 (gmt 0) |
Hi Jim, I inquired with my host and they said that this was likely caused by an erroneous character in the HTACCESS and such errors are not recorded in the error log. Is there any other way to sort this out? Thanks!
|
jdMorgan

msg:4018160 | 1:35 pm on Nov 3, 2009 (gmt 0) |
First try examining and then saving your .htaccess file with a very-simple plain-text editor such as Windows NotePad. Re-upload this saved file to the server. You may or may not see anything wrong when viewing/editing the file, but perhaps the incorrect characters will get re-encoded to something that will show in your error log. Do be sure in the future to only edit server config files with a plain-text editor. [added] I just copied and pasted the new rule you posted in your first post above, just in case I might spot an encoded character. I noticed that there is a space between "[R=301," and "L]" in that rule that is not at all obvious when viewed in this forum's font. That space could also be the problem. Be aware that your are not free to 'format' server config code in any way you like; It should be formatted exactly as specified in the documentation. High-level programming and scripting languages are very forgiving of formatting variations, but Apache modules are not: They are purpose-built and written to be super-efficient and fast; if you make even the smallest mistake, Apache won't forgive it. [/added] Jim
|
pro_seo

msg:4018412 | 6:50 pm on Nov 3, 2009 (gmt 0) |
You're spot on Jim! That extra character between the ["R=301," and "L]" caused the error. I have removed that space and the redirects are working fine. Thanks a ton for your help, as always Jim :) BTW, is the code I pasted for integrating multiple RewriteCond for Query Strings correct? Thanks again!
|
jdMorgan

msg:4018724 | 2:27 am on Nov 4, 2009 (gmt 0) |
It's correct, but you could use the "local OR" method to shorten it to one RewriteCond line:
RewriteCond %{QUERY_STRING} ^(ArticleID¦DepartmentID¦News(id¦ID)¦article)=
However, you must replace each of the broken pipe "¦" characters above with solid pipe characters before use; Posting on this forum modifies the pipe characters. Jim
|
pro_seo

msg:4018762 | 5:46 am on Nov 4, 2009 (gmt 0) |
Ok..thanks a lot Jim :)
|
|