• Resolved leggedy

    (@leggedy)


    Hi,

    since the update from version 4.9.0 and later.

    it keeps on adding some extra lines onto my htaccess that give this 500 internal server error.

    here is my htacess before update;
    # HTTPS forced by SG-Optimizer
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    </IfModule>
    # END HTTPS
    # BEGIN WordPress
    # The directives (lines) between “BEGIN WordPress” and “END WordPress” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domain.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ https://www.domain.co/wp-content/uploads/2020/12/copyright.jpg [NC,R,L]

    After updating Woocommerce to 4.9.0 and later

    # HTTPS forced by SG-Optimizer
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    </IfModule>
    # END HTTPS
    # BEGIN WordPress
    # The directives (lines) between “BEGIN WordPress” and “END WordPress” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /en/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /en/index.php [L]
    </IfModule>
    # END WordPress

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domain.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ https://www.domain.co/wp-content/uploads/2020/12/copyright.jpg [NC,R,L]

    this line of;
    RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    been causing 500 internal server error.

    How do I prevent this from happening?
    Otherwise on each update of Woocommerce, I will have to remove this manually.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi!

    Thanks for reaching out!

    WooCommerce itself won’t modify your .htaccess file. these modifications are likely coming from a different plugin.

    It will be great if you could share your current System Status Report. You can get it by navigating to the WooCommerce / Status section of your site. Once there, click on the Get system report button and then copy it by clicking on the Copy for support button. Then paste it here in a comment.

    Looking forward to hearing from you!

    Thread Starter leggedy

    (@leggedy)

    there you go

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://www.trulygourmet.co
    Site address (URL): https://www.trulygourmet.co
    WC Version: 4.9.2
    REST API Version: ✔ 4.9.2
    WC Blocks Version: ✔ 4.0.0
    Action Scheduler Version: ✔ 3.1.6
    WC Admin Version: ✔ 1.8.3
    Log Directory Writable: ✔
    WP Version: 5.6
    WP Multisite: –
    WP Memory Limit: 768 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_US
    External object cache: ✔
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.3.26
    PHP Post Max Size: 256 MB
    PHP Time Limit: 120
    PHP Max Input Vars: 3000
    cURL Version: 7.66.0
    OpenSSL/1.1.1g-fips
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.32-35-log
    Max Upload Size: 256 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 4.9.2
    WC Database Prefix: rlj_
    Total Database Size: 23.15MB
    Database Data Size: 18.12MB
    Database Index Size: 5.03MB
    rlj_woocommerce_sessions: Data: 0.09MB + Index: 0.02MB + Engine InnoDB
    rlj_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    rlj_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_woocommerce_order_itemmeta: Data: 0.11MB + Index: 0.06MB + Engine InnoDB
    rlj_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    rlj_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_actionscheduler_actions: Data: 4.02MB + Index: 1.05MB + Engine InnoDB
    rlj_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_actionscheduler_logs: Data: 0.08MB + Index: 0.03MB + Engine InnoDB
    rlj_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_comments: Data: 0.06MB + Index: 0.09MB + Engine InnoDB
    rlj_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_options: Data: 3.06MB + Index: 0.16MB + Engine InnoDB
    rlj_postmeta: Data: 0.45MB + Index: 0.27MB + Engine InnoDB
    rlj_posts: Data: 5.42MB + Index: 0.09MB + Engine InnoDB
    rlj_redirection_404: Data: 0.05MB + Index: 0.05MB + Engine InnoDB
    rlj_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    rlj_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    rlj_shopmagic_automation_outcome: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_shopmagic_automation_outcome_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_shopmagic_guest: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_shopmagic_guest_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_shopmagic_optin_email: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_social_users: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_trp_dictionary_en_us_ms_my: Data: 0.13MB + Index: 0.11MB + Engine InnoDB
    rlj_trp_gettext_en_us: Data: 1.52MB + Index: 0.73MB + Engine InnoDB
    rlj_trp_gettext_ms_my: Data: 1.52MB + Index: 0.59MB + Engine InnoDB
    rlj_trp_original_meta: Data: 0.11MB + Index: 0.16MB + Engine InnoDB
    rlj_trp_original_strings: Data: 0.11MB + Index: 0.08MB + Engine InnoDB
    rlj_usermeta: Data: 0.17MB + Index: 0.14MB + Engine InnoDB
    rlj_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    rlj_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    rlj_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    rlj_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    rlj_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    rlj_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_woo_shippment_provider: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
    rlj_yoast_indexable: Data: 0.11MB + Index: 0.08MB + Engine InnoDB
    rlj_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    rlj_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    rlj_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    rlj_yoast_seo_links: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 69
    custom_css: 1
    customize_changeset: 12
    et_footer_layout: 1
    et_pb_layout: 2
    et_template: 2
    et_theme_builder: 1
    language_switcher: 3
    nav_menu_item: 15
    page: 14
    post: 1
    product: 2
    product_variation: 4
    revision: 269
    shop_coupon: 7
    shop_order: 74
    shop_order_refund: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (23) ###
    
    Akismet Anti-Spam: by Automattic – 4.1.8
    Payment Gateway Based Fees and Discounts for WooCommerce: by Tyche Softwares – 2.6.2
    Code Snippets: by Code Snippets Pro – 2.14.0
    Customer Reviews for WooCommerce: by Customer Reviews – 4.2
    Estimate delivery date for WooCommerce: by PI WebSolution – 4.9.1
    Facebook for WooCommerce: by Facebook – 2.2.0
    Flexible Shipping: by WP Desk – 4.0.8
    Google XML Sitemaps: by Auctollo – 4.1.1
    Jetpack by WordPress.com: by Automattic – 9.3.1
    Google Ads & Marketing by Kliken: by Kliken – 1.0.6
    Mailchimp for WooCommerce: by Mailchimp – 2.5.0
    Redirection: by John Godley – 5.0.1
    SG Optimizer: by SiteGround – 5.7.13
    Sucuri Security - Auditing, Malware Scanner and Hardening: by Sucuri Inc. – 1.8.25
    Super Socializer: by Team Heateor – 7.13.11
    TranslatePress - Multilingual: by Cozmoslabs
    Razvan Mocanu
    Madalin Ungureanu
    Cristophor Hurduban – 1.9.3
    
    UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
    DavidAnderson – 1.16.46
    
    Advanced Shipment Tracking for WooCommerce: by zorem – 3.2.0.1
    Stripe For WooCommerce: by Payment Plugins
    support@paymentplugins.com – 3.2.11
    
    WooCommerce Google Analytics Integration: by WooCommerce – 1.5.0
    WooCommerce: by Automattic – 4.9.2
    Yoast SEO: by Team Yoast – 15.7
    WP Rollback: by Impress.org – 1.7.1
    
    ### Inactive Plugins (0) ###
    
    ### Dropin Plugins (1) ###
    
    object-cache.php: Memcached
    
    ### Settings ###
    
    API Enabled: ✔
    Force SSL: –
    Currency: MYR (RM)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: ✔
    
    ### WC Pages ###
    
    Shop base: #5 - /shop/
    Cart: #6 - /cart/
    Checkout: #7 - /checkout/
    My account: #8 - /my-account/
    Terms and conditions: #70 - /terms-of-use/
    
    ### Theme ###
    
    Name: Divi
    Version: 4.8.1
    Author URL: http://www.elegantthemes.com
    Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Complete: 4,752
    Oldest: 2020-12-26 11:19:10 +0000
    Newest: 2021-01-26 11:03:41 +0000
    
    Pending: 3
    Oldest: 2021-01-26 11:18:41 +0000
    Newest: 2021-01-26 15:46:34 +0000
    
    
    Plugin Support Tseten a11n

    (@tibetanitech)

    Thank you for the system status report, as far as I see the following plugins could have edited your .htaccess file:

    Redirection: by John Godley – 5.0.1
    SG Optimizer: by SiteGround – 5.7.13
    Sucuri Security – Auditing, Malware Scanner and Hardening: by Sucuri Inc. – 1.8.25

    We recommend doing a full conflict test to confirm, where these changes are coming from. To learn more about the conflict test, please check the following link:

    https://docs.woocommerce.com/document/how-to-test-for-conflicts/

    Thread Starter leggedy

    (@leggedy)

    Great! Thanks for this, I will take note and do the conflict testing

    Hi @leggedy we haven’t heard from you in a while so We’re going to mark this thread as resolved.

    If you need further help feel free to reopen it.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘500 internal error due to htaccess update’ is closed to new replies.