Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Changing Domains - Please help with .htaccess redirects

Featured Replies

So I'm going to be moving a website to a new domain in the near future and I know we need to set up redirects on most of the pages for SEO purposes, but it's sort of a tricky situation. I'm not familiar enough with .htaccess code to understand how to do what I need it to do. Could someone help me write the proper redirects?

 

I'm moving a website to a new domain name, but we are putting up a new website at the current domain name as well, so we can't do a full domain redirect.

 

I need to redirect all directories and pages to the same directories/pages on the new domain. Something like this:

 

currentdomain.com/about-us/ -> newdomain.com/about-us/

 

currentdomain.com/about-us/team/ -> newdomain.com/about-us/team/

 

currentdomain.com/webinars/(any page) -> newdomain.com/webinars/(same page name)

 

I found this page (https://gist.github.com/ScottPhillips/1721489), and I think below is close to what I need, but like I said, I'm not really sure how this all works. I think I need "redirect from old domain, with subdirectory and/or full path, to new domain with sub directory and/or full path"

#Redirect from old domain to new domain with full path and query string:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*) http://www.newdomain.com%{REQUEST_URI} [R=302,NC]
 
#Redirect from old domain with subdirectory to new domain w/o subdirectory including 
full path and query string:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/subdirname/(.*)$
RewriteRule ^(.*) http://www.katcode.com/%1 [R=302,NC] 

This site is built in Wordpress.

 

Thanks for any help!

If you hosting has cpanel I've seen a section in admin that allows you to manage redirects without editing the htaccess directly.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.