• I am trying to do some gzip compression and other things to my .htaccess but when I upload it wont make any changes, it always trowing back the following:

    # BEGIN WordPress
    <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

    You anyone know what cant be happening, i dont not have any type of pluging like w3 chance or nothing installed.

    Your help would be appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator James Huff

    (@macmanx)

    WordPress will always replace anything between # BEGIN WordPress and # END WordPress with its core rules.

    Place any additional rules either before # BEGIN WordPress or after # END WordPress .

    In your case, since you’re adding rules to enable compression, I recommend placing those before # BEGIN WordPress .

    Thread Starter raws4581

    (@raws4581)

    I am doing this:

    <ifModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </ifModule>

    # BEGIN WordPress
    <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

    but it always delete everything at the top and just show, also it seems that the .htaccess files go back to permission 444 not 644 or 777 when I change it

    # BEGIN WordPress
    <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

    Moderator James Huff

    (@macmanx)

    Hm, that shouldn’t be a problem.

    How are you editing the .htaccess file exactly, and how quickly does it revert?

    Thread Starter raws4581

    (@raws4581)

    Manually like ive done all my other project in dreamweaver and uploading it, it reverts right away, not sure if is the hosting or wordpress

    Moderator James Huff

    (@macmanx)

    Try accessing your server via FTP or SFTP and editing the file directly on the server with a plain text editor.

    Thread Starter raws4581

    (@raws4581)

    I tried deactivating all plugin, reupload .htaccess, follow your recommendations, it still doing the same, it only happen on this server, not sure if this could be apache server or wordpress because wordpress does not do it for all other site we have but hosted at https://www.site5.com this particular site is hosted somewhere else, so i think it can be the server?

    Moderator James Huff

    (@macmanx)

    What plugins do you have installed?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WordPress and htaccess’ is closed to new replies.