Redirecting a Web Folder Directory to another Directory in htaccess
…the non-www as preference. RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.olddomain\.com$ RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] RewriteCond %{HTTP_HOST} !^olddomain\.com$ RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] The above here will redirect 301 all urls from one…
Read MoreChange and Update WordPress URLS in Database When Site is Moved to new Host
…wp_options SET option_value = replace(option_value, ‘http://www.oldurl’, ‘http://www.newurl’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’; UPDATE wp_posts SET guid = replace(guid, ‘http://www.oldurl’,’http://www.newurl’); UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldurl’, ‘http://www.newurl’);…
Read MoreRedirect all pages to non-www and HTTPS in WordPress
…off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # END Redirects If you still want the www way instead https://www.example.com # BEGIN Redirects RewriteEngine On # 301 redirect to www RewriteCond %{HTTP_HOST} !^www\….
Read MoreUse 7G WAF Firewall with OpenLiteSpeed on a RunCloud instance
…Version 1.2 2020/09/07 by Jeff Starr https://perishablepress.com/7g-firewall/ https://perishablepress.com/7g-firewall-log-blocked-requests/ – License: GPL v3 or later https://www.gnu.org/licenses/gpl.txt Overview: Logs HTTP requests blocked by 7G. Recommended for testing/development only. Requires: Apache, mod_rewrite, PHP…
Read MoreInstall Apache, MySQL, PHP on macOS 11 Big Sur and earlier macOS
…command and hit enter, some commands give you no response – it just means the command is done, other commands give you feedback. Using the prefix of sudo is required…
Read MoreSet up malware scanner LMD Maldet and ClamAV on a CloudPanel instance
…directory that you scan: wget http://www.eicar.org/download/eicar.com wget http://www.eicar.org/download/eicar.com.txt wget http://www.eicar.org/download/eicar_com.zip wget http://www.eicar.org/download/eicarcom2.zip Using LMD as a monitoring app LMD also allows for it to be a monitoring daemon application that…
Read MoreSet up malware scanner LMD Maldet and ClamAV on a RunCloud instance
…which are not malware but will show in a scan, download and use files below to test in a directory that you scan: wget http://www.eicar.org/download/eicar.com wget http://www.eicar.org/download/eicar.com.txt wget http://www.eicar.org/download/eicar_com.zip wget…
Read MoreSet up Virtual Hosts on macOS Big Sur 11 in Apache
…to create your new virtual host: <VirtualHost *:80> ServerAdmin [email protected].com DocumentRoot “/usr/docs/dummy-host.example.com” ServerName dummy-host.example.com ServerAlias www.dummy-host.example.com ErrorLog “/private/var/log/apache2/dummy-host.example.com-error_log” CustomLog “/private/var/log/apache2/dummy-host.example.com-access_log” common </VirtualHost> We can take this example and extend on…
Read MoreRedirect an admin user role on login with login redirect
…$request, $user ) { //is there a user to check? if ( isset( $user->roles ) && is_array( $user->roles ) ) { //check for admins if ( in_array( ‘administrator’, $user->roles )…
Read MoreInstalling & Configuring Apache on macOS using Homebrew and use Sites folder
…AllowOverride All Find: User _www Group _www Change: User shortusername Group staff Find: #ServerName www.example.com:8080 Change: ServerName localhost Find and uncomment: LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so Now the webroot is /Users/shortusername/Sites/ just…
Read More