Home › Forums › BulletProof Security Pro › Random General Questions
- This topic has 349 replies, 35 voices, and was last updated 2 years, 7 months ago by
EmilianoJoel.
-
AuthorPosts
-
AITpro Admin
KeymasterYou can try something simple like reinstalling WordPress > Dashboard link > Updates link > Re-install Now to see if that fixes the problem.
carsafety
ParticipantOkay it seems that the rewrite rule inserted by cpanel did not work. Combined with ARQ being enabled, that was messing up support from troubleshooting. Once I disabled all the modules and reverted to WordPress default .htaccess they came up with a fix.
For reference, here is what cpanel added, and what I then added to CUSTOM CODE BOTTOM:
RewriteCond %{HTTP_HOST} ^carseatblog\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.carseatblog\.com$ RewriteRule ^carseatblogcoms\-recommended\-car\-seats$ "http\:\/\/carseatblog\.com\/safest\-recommended\-car\-seats" [R=301,L]
Now here is what support added that is now working with a basic .htaccess file:
Redirect 301 /carseatblogcoms-recommended-car-seats http://carseatblog.com/safest-recommended-car-seats
I only know enough about .htaccess and rewrites to know they can really screw up my website. Since it is now working, I think the next step would be this – Add the simpler rule that is currently working to CUSTOM CODE BOTTOM, then save secure .htaccess, then re-activate root and all other BPS modules? Does that seem reasonable or do you have any other suggestions? It’s just one simple keyword change in a single page URL permalink that I needed to redirect. Oh and I assume there is no security issue in posting those rules here but please feel free to remove/edit if so.
Thanks!
AITpro Admin
KeymasterARQ is amazing, but it cannot tell who you are if you are manually modifying files or folders outside of your WordPress Dashboard – that is not possible. See the ARQ procedural steps when manually modifying files or folders outside of your WordPress Dashboard: http://forum.ait-pro.com/forums/topic/autorestore-quarantine-guide-read-me-first/#procedural-steps
[incorrect info removed]
Your Redirect rule goes in this BPS Root Custom Code text box: CUSTOM CODE BOTTOM HOTLINKING/FORBID COMMENT SPAMMERS/BLOCK BOTS/BLOCK IP/REDIRECT CODE. After adding any new custom code to BPS Custom Code do the Custom Code setup steps below.
Root htaccess File Custom Code Setup Steps
1. Enter your custom code in the appropriate Root Custom Code text box.
2. Click the Save Root Custom Code button to save your Root custom code.
3. Go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.carsafety
ParticipantYeah I know about ARQ I forget about it and it gets me every time, which is why I unfortunately leave it disabled.
So for the rewrite inept, is the rule given to me by my hosting support valid as well? In that it’s working, I’m leaning toward putting that into the CUSTOM CODE BOTTOM section, rather than experiment with editing the one in the link you provided.
AITpro Admin
KeymasterARQ is the most powerful security feature in BPS Pro so you probably want to enable it, but do whatever works best for you. 😉 [incorrect info removed]
carsafety
ParticipantYeah if only I could remember to temporarily disable ARQ when I submit a support ticket or change a file myself!
I added their redirect and so far so good. It appears to redirect both www and non-www versions of the old url to the non-www version of the new url, which is how I want it. Thanks again for the help and please have a safe, happy and hacker-free Thanksgiving!
AITpro Admin
KeymasterEdit: incorrect info has been removed from my previous replies so that that bad info does not confuse someone else
Oh my mistake, the code is not rewriting non-www to www or vice versa and is instead rewriting both www or non-www domain URI’s to the same place. So actually it will work fine as stand-alone code in the CUSTOM CODE BOTTOM text box and should not be combined into the WP REWRITE LOOP START code.
Paul
ParticipantHi,
I wondered if you could just confirm, i have another site not a WP site so no BPS on it but i want to redirectwww.mysite.co.uk/index.htm
towww.mysite.co.uk
so losing the index.htm
would i use# Turn on the URL rewrite engine RewriteEngine On RewriteCond %{THE_REQUEST} \s/index\.htm\s [NC] RewriteRule . / [R=301,L]
I have tried it and it seems to work but just wanted to make sure i was not causing any other issues
ThanksAnd to direct all non www. to www. would i add to that
RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
AITpro Admin
KeymasterRewrite/Redirect non-www to www and index.htm to the root URI.
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R,L] RewriteRule ^index\.htm$ / [R,L]
Paul
ParticipantThanks so combining both would be
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^example\.co.uk$ [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R,L] RewriteRule ^index\.htm$ / [R,L]
changed .com to .co.uk and example is the domain eg mysite
AITpro Admin
KeymasterYes, but don’t forget to change “example” to your actual domain name and you should escape all dots: ^your-actual-domain-name\.co\.uk$
Paul
ParticipantOk so last look if my site was
www.microsoft.co.uk
this would be itRewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^microsof\.co\.uk$ [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R,L] RewriteRule ^index\.htm$ / [R,L]
AITpro Admin
KeymasterYes, that is perfect.
Paul
ParticipantThank you very much, appreciate the help
Dave
ParticipantHi everyone,
I’ve noticed that some of my site files have been deleted and curious to know if BulletProof Pro might have done it? Is there anyone that can confirm if this might be the case and if so why?
These are the two affected files, their locations and symptoms:
- /wp-admin/index.php; code in the script changes and produce a white screen when attempt to login to the CMS admin
- /wp-content/themes/cheope/footer.php; this file gets remove
Any help would be much appreciated!
Shep
-
AuthorPosts
- You must be logged in to reply to this topic.