Solved

Change Wordpress URL

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

WordPress can be pretty daunting, especially for a beginner, so I thought it might be a good idea to write an article to show how easy it is to get started in WordPress and to design a custom theme.  The first step is to check with your hosting comp…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …

747 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

11 Experts available now in Live!

Get 1:1 Help Now