Redirects
CyberPanelCode Snippets
This is how to redirect a dev domain to https://riverworksmarketing.com via .htaccess. The '$' symbol will match any urls on the dev domain and redirect to that page on the live domain.
RewriteEngine on
RewriteRule ^(.*)$ https://riverworksmarketing.com/$1 [R=301,L].htaccess code to force redirection
# Force Redirect to www:
RewriteCond %{HTTP_HOST} !^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://www.%{SERVER_NAME}/$1 [R,L]
---------------------------------------------------------------
# Force Redirect to non-www:
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
----------------------------------------------------------------
# Force https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [L,R=301]CyberPanel .htaccess redirect example:
RewriteRule ^about/?$ /chattanooga-water-heaters [L,R=301]
RewriteRule ^installation/?$ /water-heater-installation [L,R=301]
RewriteRule ^warranty/?$ /new-water-heater-warranty [L,R=301]
RewriteRule ^contact-us/?$ /water-heaters-near-me-contact [L,R=301]