• My site was hacked. The htaccess had a 301 redirect. I deleted it. But I also deleted some wordpress plugin code and now my site is showing that the renamed pages are missing.

    BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %

    {REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteEngine on
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1]
    RewriteCond %

    {HTTP_REFERER} !^https://www.jesusradicals.com/wp-admin
    RewriteRule ^(.*)wp-content/uploads/(.*) /index.php?

    attachment=$2&scoper_rewrite=1 [NC,L]
    </IfModule>

    # END

    WordPress

    After this was the hack. I may have deleted something. What might that have been?

Viewing 11 replies - 1 through 11 (of 11 total)
  • I think that should be..

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteEngine on
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
    RewriteCond %{HTTP_REFERER} !^https://www.jesusradicals.com/wp-admin
    RewriteRule ^(.*)wp-content/uploads/(.*) /index.php?attachment=$2&scoper_rewrite=1 [NC,L]
    </IfModule>
    
    # END WordPress

    Looks like editting has thrown off the formatting..

    Although i’m not sure why you have the rules you have and if they are correct, the above is formatted correctly now… i think..

    Thread Starter refugee43

    (@refugee43)

    I added the following from the wordpress permalinks:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteEngine on
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1]
    RewriteCond %{HTTP_REFERER} !^https://www.jesusradicals.com/wp-admin
    RewriteRule ^(.*)wp-content/uploads/(.*) /index.php?attachment=$2&scoper_rewrite=1 [NC,L]
    </IfModule>

    Still all my pages are giving a 404 error.

    https://www.jesusradicals.com

    Thread Starter refugee43

    (@refugee43)

    I replaced the above with the reformatted code from t31os

    No go. I cannot even preview the pages now.

    Thread Starter refugee43

    (@refugee43)

    I was using the permlinks `/%POSTNAME%/ plus SEO title tags and ZD header tag plugins. I thought they might have written this onto the htaccess file.

    Permalinks don’t work on either my local install or live site, so i can’t suggest anything else fix wise..

    Removing those lines will give you access back in any case..

    Thread Starter refugee43

    (@refugee43)

    what lines?

    I tried your code, nothing changed.

    Code from the hack was:

    #RewriteEngine On
    #RewriteBase /
    #RewriteCond %{HTTP_USER_AGENT} (Googlebot|Slurp|msnbot)
    #RewriteRule ^ https://doormoney.us/ [R=301,L]

    Peeps should check their htaccess file. the link might change up….

    It is pretty hard to get any help on wordpress forums I have noticed.

    It is pretty hard to get any help on wordpress forums I have noticed.

    volunteer some time and help us out

    Seems i’ve fixed my permalink issue on both my local install and live site.

    Options FollowSymlinks
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    The important factor there is this ‘Options FollowSymlinks’…

    I read around on various sites about htaccess, spent a few hours fiddling with httpd.conf, then stumbled on a bit of info about symlinks.

    It may not be needed for some people, but certainly adding the followsymlinks worked for me…

    However, this did cause one small issue in that any theme files linking like this… (which i was while adding stuff for testing)…

    “wp-content/themes/MYTHEME/”

    Would suddenly have the permalink structure added…

    “the-post-name/year/wp-content/themes/MYTHEME/”

    Using <?php bloginfo('template_url')/myfile.css(or .php whatever); ?> resolved the problem.

    Might help some peeps, because i had got stumped on the issue before but couldn’t be fussed to sort it out….

    You’ll need to add that line manually to the .htaccess

    Hi All,

    Just to inform you. My plugin don’t use or rewrites .htaccess file. It might be due to any other plugin that you are using.

    Sorry for delayed reply.

    Regards,
    Proloy

    Hello:

    I have the same issue, plus, I am loosing control of a password protected page.

    What I mean is that when I add the code, I get to the page where I should be delivered, but when I try to access the password protected page, I am also redirected to the blog.

    ‘<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule> ‘

    Can someone tell me why is my htaccess file overriding my password protected page? How can I fix this if possible.

    Thank you.

    I was able to have my password protected file working. However, since I am trying to use pretty permalinks like /%categry%/%postname%/, but when I click on the links at my blog, I get a not found error page.

    Thank you.

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