?
Solved

Change Wordpress URL

Posted on 2016-07-22
2
Medium Priority
?
67 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 2000 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 August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free 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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
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 exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
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 …
Suggested Courses

777 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