• Hi there,

    I gues my .htaccess file is something wrong.

    This is my .htaccess:

    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
    <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
    </IfModule>
    # END W3TC Browser Cache
    # BEGIN WordPress

    # END WordPress

    Can some post it how should it be right!
    The dir is at my

    public_html/.htaccess

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    This is default WordPress .htaccess

    # 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

    If you use cache plugin, it can modify your file for this purpose. So for avoid any errors, disable first cache plugin, then set up it again.

    You can try to click “save” in Settings – Permalinks what have impact to this file.

    Thread Starter crash010101

    (@crash010101)

    Thanks for replay.

    I uploaded the .htaccess, and I am still getting the same error. So the error is when I go on page https://www.mysite.com/wp-admin/

    Forbidden

    You don’t have permission to access /wp-admin/ on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I have disable cache pluging, but the same problem.

    Thank you …

    I am not sure how W3TC works, but if you disable it, check if there are some files in cache or in root.
    Check this link https://redstarwebdevelopment.com/2013/05/how-to-remove-w3-total-cache/
    or search for something similar as I really don’t use that plugin, so don’t know how it is actual.
    You have maybe something in config.php from that cache plugin …

    Another possible issue can be setting of your server, try to check in docs for your hosting how to correctly set up .httacess file. Some hosting/servers use special settings …

    Normaly /wp-admin/ redirect to wp-login.php…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.htaccess file , Can some give me the right file code inside’ is closed to new replies.