Solved

Change Wordpress URL

Posted on 2016-07-22
2
46 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
2 Comments
 
LVL 35

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
This article discusses four methods for overlaying images in a container on a web page
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The viewer will learn how to dynamically set the form action using jQuery.

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now