• MACscr

    (@macscr)


    Using the latest version of the redirection plugin as of this date and I have verified that that .htaccess file has the proper perms that enable the web server (apache php7.1-fpm) to write to it, yet no updates happen and all the 220 redirects seem to be happening through wordpress. Obviously that’s not efficient. Any suggestions?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author John Godley

    (@johnny5)

    Have you assigned them to a group that uses Apache? Have you configured the Apache settings on the options page?

    Thread Starter MACscr

    (@macscr)

    Them? php has full access to write to the directory that wordpress resides in. This is proven with any wordpress update or plugin install, etc. I see no permission denied errors in the apache logs either. I would hope your plugin is also smart enough to check permissions on the .htaccess path when the settings are saved for your plugin.

    Plugin Author John Godley

    (@johnny5)

    The redirects.

    From the groups page you can configure a group to be Apache. Any redirects assigned to that group will then be saved to the .htaccess file that you setup as part of the settings page.

    Permissions can and do change, and every site has a different setup. I do not know what yours is and I so have to ask these things.

    Thread Starter MACscr

    (@macscr)

    ah, my apologies. I do see the group thing and have made the adjustments. It does create the redirects, but they do not appear to be redirected. Here is the .htaccess result:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !example.church$ [NC]
    RewriteRule ^(.*)$ https://example.church/$1 [L,R=301]
    # BEGIN WPSuperCache
    # END WPSuperCache
    # 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
    
    # Created by Redirection
    # Tue, 20 Mar 2018 23:12:52 +0000
    # Redirection 3.2 - https://redirection.me
    
    <IfModule mod_rewrite.c>
    RewriteRule ^mobileappbutton$ https://example.church/series [R=301,L]
    RewriteRule ^mobileappbuttonimage$ https://example-web-cdn.s3.amazonaws.com/OTT/Tribal/TribalMobileButton-AppHome.png [R=301,L]
    RewriteRule ^example-me/$ https://example.church/example-account/ [R=301,L]
    RewriteRule ^check-in$ https://resources.example.church/discoveryland [R=301,L]
    RewriteRule ^getaway2017$ https://example.church/the-getaway-2017 [R=301,L]
    RewriteRule ^thegetaway$ https://example.church/getaway2017 [R=301,L]
    RewriteRule ^fooddrive$ https://example.church/calendar/food-drive/ [R=301,L]
    RewriteRule ^life-help-benevolence-request-form/$ https://example.church/crisis-benevolence-assistance-request-form/ [R=301,L]
    RewriteRule ^centered$ https://example.church/calendar/centered-cultivating-christ-centered-families/ [R=301,L]
    RewriteRule ^hillsong$ https://example.church/calendar/hillsong-worship-tour/ [R=301,L]
    </IfModule>
    Thread Starter MACscr

    (@macscr)

    Any ideas?

    I’m not really an htaccess expert, but think I see why the above rules won’t work: the WordPress rules have already processed the request before they execute. Your rewrite rules need to go inside the WordPress block. Put them between RewriteBase and the rule for index.php.

    This is how I put in my hard-coded rewrite rules:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    
    # GONE
    RewriteRule ^typo3temp\/(.*)$ - [G,L]
    RewriteRule ^idc\/(.*)$ - [G,L]
    RewriteRule ^fusa\/(.*)$ - [G,L]
    RewriteRule ^fileadmin\/(.*)$ - [G,L]
    
    # FORBIDDEN
    RewriteRule ^\.well-known\/(.*)$ - [F,L]
    RewriteRule ^browserconfig.xml - [F,L]
    
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    
    • This reply was modified 6 years, 12 months ago by photocurio.
    • This reply was modified 6 years, 12 months ago by photocurio.
    Thread Starter MACscr

    (@macscr)

    If thats the case, the issue would be the fault of the plugin for not adding the rewrite rules in the correct place.

    Hi everyone,

    I think I am facing the same problem: Rewrite rules are added to the bottom of the .htaccess file below the “WordPress part”.

    Furthermore, activating a group to directly write to the .htaccess file using Apache will kill my site, only throwing 500er errors until I manually remove the part Redirection wrote into the file.

    I am on Apache and PHP Version : 7.2.4. All other plugins writing to .htaccess have been disabled for this test.

    Is there some option I have missed, telling the plugin where in the .htaccess file to add the rewrite rules?

    Thanks and have a good weekend!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘htaccess not being updated?’ is closed to new replies.