Question

I have a webiste on which I use permalinks like /%category%/%postname%/ .

They were working fine a week or two ago. Now when I want to enter a page a get an error telling me that the page is not redirected correctly.

I have no redirects made in my htaccess file. NONE. If I change the permalinks to default then every page/post works fine.

I do not know what to do. Please help

Here is the .htaccess

<ifModule mod_headers.c>
  ExpiresActive On
  # Expires after 1 month
  <filesMatch ".(gif|png|jpg|jpeg|ico|pdf|js|htm|html|txt)$">
    Header set Cache-Control "max-age=2592000"
  </filesMatch>
  # Expires after 1 day
  <filesMatch ".(css)$">
    Header set Cache-Control "max-age=2592000"
  </filesMatch>
</ifModule>
# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
        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>
# END W3TC Browser Cache
# 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
Was it helpful?

Solution

Very general way to fix wordpress redirect issues: (should work in all cases)

  1. /wp-admin/options-permalink.php Click "save changes". this will refresh WP redirect rules.
  2. check .htaccess, try to comment everything except WP part.
  3. Try to temporary disable plugins. Quick way is to rename wp-content/plugins/ folder, WP will not disable plugins, just will not load them. ATTENTION: do not visit /wp-admin/plugins.php when wp-content/plugins/ is renamed, becouse WP would auto disable them all.
  4. check your themes files, functions.php, try to activate WP another/default theme for test.
  5. If above do not work, download new fresh WP version.

TIP: try to never change files in wp-admin/ or wp-includes/ folder. These gives disaster in future.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top