The -f will match…
I know. No insults here?
1- The definition of a Master idiot and Idiot-phobic is those who think other people is asking questions because they are idiots, and ignore there are other causes for the questions, like I’m not an Apache programmer, not a formal programmer at all. I just learned PHP and Basic and JavaScript and ActionScript by using it. Enough for me to still develop wordpress sites and “ask” for help, as the first line of the message said.
1-a I didn’t know there are a [rant] shortcode. You are very ingenious and have an original way to help. Would you help people who are not idiots? How do you tell? They speak proper english? Do you know only ONE language?
1-b I’d rather open it and close it twice than messing with WP code, because everything inside #Begin WordPress comments will be overridden in the next page load.
3- “Catched” wanted to be the past for “Catch”, or the misspelling for “caught”. Will you help people with grammar and spelling errors? Does your brain consider an idiot to everyone with less experience than you? Is there a limit? A quantum physics scientist asking for help to code his website with front-page (if still exists) is an idiot too? Should a person knowing one more language than you or cooking better barbecues than yours consider you an “idiot” if he/she had your stupid brain? ir is it a defect in DNA not related to a brain defect?
# This code will never be matched/redirected as the above block will have removed blog/
RewriteCond %{HTTP_HOST} =!blog/page/.*
RewriteCond %{HTTP_HOST} =!blog/tag/.*
RewriteCond %{HTTP_HOST} =!blog/category/.*
RewriteRule ^blog/(.*) http://%{SERVER_NAME}/$1 [R=301,L]
The code above this ( specifically ^blog/(.*)\.html ) was expected to remove blog/ ONLY to pages containing .html AND blog/ , and IT DID, but it was removing .html to ALL the requests, even the ones which didn’t have bog/.
I fixed it adding RewriteCond %{HTTP_HOST} =/blog/.* to the first rule and it totally works now.
It was the main request of this topic and You totally missed it. I hope helps others.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
# doesn't index.php exist? !-f will be sufficient
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? /index.php [L]
# Handle empty request, too!
</IfModule>
You can send a ticket to WordPress team with your narrow opinions so they can re-evaluate their world’s-most-used cms platform for that last code. They must be idiots too.
Thank you!