Create subdomain masking for each user in WordPress
Create subdomain masking for each user in WordPress
Create subdomain masking for each user in WordPress
I was able to figure out that because Lightsail uses a Bitnami deployment of WordPress, Bitnami overrides the .htaccess file. Instead you have to update the /opt/bitnami/apache2/conf/httpd.conf file by adding the following content: <IfModule headers_module> <IfVersion >= 2.4.7 > Header always setifempty X-Frame-Options ALLOW-FROM https://*.example.com </IfVersion> <IfVersion < 2.4.7 > Header always merge X-Frame-Options ALLOW-FROM … Read more
Block only external access to wp-cron.php on OpenLiteSpeed
This “exception” would only be required if you are requesting virtual URLs within /folderToExclude, as opposed to physical files. Any requests to physical directories and files are naturally excluded by the standard WordPress directives. RewriteCond %{REQUEST_URI} !^/(folderToExclude/.*)$ # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] This condition (RewriteCond directive) won’t do anything … Read more
You’ll need to use mod_rewrite (RewriteRule and RewriteCond) directive(s) instead, as opposed to a mod_alias Redirect directive, in order to check the requested Host header. For example, try the following near the top of the .htaccess file, before the # BEGIN WordPress section (the order of directives is important): RewriteCond %{HTTP_HOST} ^foo\.org [NC] RewriteRule ^events$ … Read more
Giving WordPress its own subdirectory – nginx
Should I add the IP of the server that hosts my sites to the list of authorized IPs in the wp-admin/.htaccess?
Here is the default .htaccess generated by WordPress for Subdomain Multisite setup: # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule . index.php [L] # END WordPress Let me know If this one doesn’t … Read more
A missing mime type should not cause a 404 page but the AddType needs to be wrapped in <IfModule mod_mime.c> tags. <IfModule mod_mime.c> AddType video/mp4 .mp4 .m4v AddType video/mpeg .mpeg .mpg .mpe AddType video/asf .asf .asx .wax .wmv .wmx AddType video/avi .avi AddType video/quicktime .mov .qt AddType audio/ogg .ogg </IfModule> I’m running jw player on … Read more
# Only allow access to this directory if they are coming from your domain; excluding you, your server, Google and any other IPs RewriteEngine On RewriteCond %{REMOTE_ADDR} !^(xxx\.xxx\.xxx\.xxx|xxx\.xxx\xxx\.xxx|66\.249\.) RewriteCond %{HTTP_HOST} !^(127\.0\.0\.0|localhost) [NC] RewriteCond %{HTTP_REFERER} !^https?://(.+\.)?yourdomain\.com/ [NC] RewriteRule .* http://yourdomain.com/ [L] That should help, I think