Solved

Change Wordpress URL

Posted on 2016-07-22
2
56 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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 purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

730 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