Support » Plugin: Redirection » Cannot Get Apache Module to Work At all?

  • HI there,

    I’ve installed the plugin, pointed the module to the full path and filename for my .htaccess.

    I then created a group for the relevant 301’s, and entered the full URL’s to redirect.

    The plugin can write to the .htaccess file, but the redirect doesn’t work.

    Here is a copy of the .htaccess file after the plugin has written to it. Any assistance would be appreciated.

    .htaccess content:

    # 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

    # Wordfence WAF
    <IfModule LiteSpeed>
    php_value auto_prepend_file ‘/home/manhattangino/public_html/wordfence-waf.php’
    </IfModule>
    <Files “.user.ini”>
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>
    </Files>

    # END Wordfence WAF

    # Created by Redirection
    # Thu, 05 Jan 2017 01:37:58 +0000
    # Redirection 2.5 – http://urbangiraffe.com/plugins/redirection/

    <IfModule mod_rewrite.c>
    RewriteRule ^/contact\.htm$ http://www.manhattanmusic.com.au/contact-us/ [R=301,L]
    </IfModule>

    # End of Redirection

Viewing 3 replies - 1 through 3 (of 3 total)
  • You should not be entering full URL, but relative ones. You should also use the plugin to redirect, not .htaccess.

    In this case, try adding a redirection IN THE PLUGIN with “regex” turned on from “^/contact\.htm$” to “/contact-us/” and check again.

    I suspect that the issue is the order of the statements in the .htaccess file. Try manually moving the wordpress block to the bottom of the file.

    However, I disagree with @galbaras – there is a role for .htaccess redirects and a different role for this plugin. In essence, …

    I use .htaccess to do site-wide redirects (like ensuring canonical URLs e.g. must start www.) or ensuring that all requests are https, and to get rid of hacking attempts without them triggering all the WP php code and overloading the server. (Happy to share some of my .htaccess code if asked nicely.)

    But I use this redirection plugin to handle all the redirects for WP content.

    • This reply was modified 1 year, 7 months ago by  EastDevonAlliance. Reason: Correct factual inaccuracies, and suggest a cause

    @eastdevonalliance, there is no disagreement. I also do canonical redirects directly, but in this case, using the plugin is better.

    On all my sites, the WP redirections appear last, so moving them to the bottom will likely help. Once again, using the “permalinks” settings page to place them correctly is the best way to go, rather than doing it manually.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot Get Apache Module to Work At all?’ is closed to new replies.