Forum Moderators: phranque
<Files .htaccess>
order allow,deny
deny from all
</Files>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
# Force redirect to https top level
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# End top level redirect
# BEGIN HTTPS Redirection Plugin
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
# END HTTPS Redirection Plugin
# BEGIN moving pages to wp
RewriteRule ^([\w-]+)\.php http://www.example.com/wp/$1 [R=301,L]
# END moving pages to wp
#BEGIN strip .php extension
RewriteRule ^(newdir/[^.]+)$ /$1.php [L]
#END strip .php extension
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
# END WordPress
<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 41.0.0.0/8
deny from 91.0.0.0/8
[edited by: bill at 4:19 am (utc) on May 19, 2016]
[edit reason] use EXAMPLE.COM [/edit]
That would appear to be the same rule twice. Why are you using a plugin if you've got the knowhow to write the rule yourself? (You obviously do, or you wouldn't be posting here.) Except that there's no point in capturing if you're just going to say %{REQUEST_URI} all the same. And psst, plugin authors: ^(.*)$ is superfluous. A simple (.*) does exactly the same thing.# Force redirect to https top level
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# End top level redirect
# BEGIN HTTPS Redirection Plugin
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
# END HTTPS Redirection Plugin
<Files .htaccess>The mere existence of htaccess implies shared hosting. If you have reason to suspect that your host isn't already blocking all requests for files in .ht (it's part of the Apache default config file), you may have bigger problems than any of us can deal with.
order allow,deny
deny from all
</Files>