Solved

Change Wordpress URL

Posted on 2016-07-22
2
60 Views
Last Modified: 2016-07-22
Hi guys,

i have a wordpress retailer theme site http://csj.uk.com and i also have a second domain csjbespoke.co.uk, and I want the URL in the address bar to show csjbespoke.co.uk and not csj.uk.com.

I have pointed the records to the same address as the current site and in cpanel (version 56.0.28) created an alias and pointed it to the current site.

The site forwards ok but the url changes to csj.uk.com.

When i change the wordpress address url in the general/settings, the admin page then points to csjbespoke.co.uk so thats fine, but when i change the site address url the page is unavailable.

I have checked its not hardcoded in the wp-options or the functions php files.

in the htaccess it shows
RewriteCond %{HTTP_HOST} ^csjbespoke\.co\.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.csjbespoke\.co\.uk$
RewriteRule ^/?$ "http\:\/\/csj\.uk\.com\/" [R=301,L]

kind of at a loss as to what to do next, so any help will be great.

regards

phil
0
Comment
Question by:deanwilsons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Accepted Solution

by:
Kimputer earned 500 total points
ID: 41724619
The rewrite rule RewriteRule ^/?$ "http\:\/\/csj\.uk\.com\/" [R=301,L] causes everything still to go to this site. Remove it from your .htaccess file
Then follow up with the already correct steps taken before  (WP site config)

I have a feeling you don't want to use csj.uk.com anymore, so maybe instead of removing it, forward csj.uk.com to cjsbespoke.co.uk. Then replace the whole htaccess file  with:


RewriteCond %{HTTP_HOST} ^csj\.uk\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.csjbespoke\.co\.uk$
RewriteRule ^/?$ "http\:\/\/csjbespoke\.co\.uk\/" [R=301,L]

You're turning the rule exactly the other way around. Everyone typing csj.uk.com will end up at csjbespoke.co.uk (but remember, this step is optional, it's after the wordpress problem has been fixed)
0
 

Author Comment

by:deanwilsons
ID: 41724665
Thanks Kimputer, that worked great.

Regards

Phil
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question