Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 05-28-2017, 11:40 PM
AzharNadeem AzharNadeem is offline
Junior Member
 
Join Date: 11-01-09
Location: Islamabad
Posts: 19
iTrader: 0 / 0%
Redirect Issue - Godaddy Managed Wordpress Hosting

Dear All
Greetings,

I 'm having a small issue and need help. I 'm hosting my website pakistantribune.com(dot)pk at Godaddy managed Wordpress. Recently, I decided to change my domain from pakistantribune.com(dot)pk to pktribune(dot)com.

Godaddy gives an option to add the domain name and make it primary. Now both the domains are added to the same account with pktribune(dot)com serving as the primary domain.

When I access pakistantribune.com(dot)pk, it goes to pktribune(dot)com. This is exactly what is required. However, everything other than homepage stays at pakistantribune.com(dot)pk and doesn't redirect.

Neither my domain registrar nor domain host is giving the option of domain forwarding.

How can I redirect whole domain pakistantribune.com(dot)pk to pktribune(dot)com? The two sites are using exactly same resources and the same .htaccess file.

Godaddy has generated following entries in the .htaccess file
Quote:
RedirectMatch 301 ^/(\d+)/([^/]+).html$ pakistantribune(dot)com(dot)pk/$2.html
RedirectMatch 301 ^/([^/]+).html/PakistanTribune$ pakistantribune(dot)com(dot)pk/$1.html
RedirectMatch 301 ^/([^/]+).html?ModPagespeed=noscript$ pakistantribune(dot)com(dot)pk/$1.html

Regards
Azhar Nadeem
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 05-29-2017, 03:46 AM
webhost.uk.net webhost.uk.net is offline
Contributing Member
 
Join Date: 07-26-09
Posts: 110
iTrader: 0 / 0%
Its wordpress right? you need to edit the database I guess config file still has the old name. If thats changed to new domain all should work fine.
 
Reply With Quote
  #3  
Old 05-29-2017, 05:53 PM
cochinweb cochinweb is offline
Junior Member
 
Join Date: 07-04-16
Location: India
Posts: 14
iTrader: 0 / 0%
I think you should remove the domain alias and configure another/new hosting account for the old domain and put an htaccess redirect on it.
 
Reply With Quote
  #4  
Old 05-30-2017, 10:12 AM
J. H. Rasmussen J. H. Rasmussen is offline
Super Moderator
 
Join Date: 11-11-11
Location: Copenhagen, Denmark
Posts: 6,001
iTrader: 1 / 100%
You could probably use .htaccess code like this:
Quote:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^pakistantribune.com.pk [NC,OR]
RewriteCond %{HTTP_HOST} ^www.pakistantribune.com.pk [NC]
RewriteRule ^(.*)$ http://pktribune.com/$1 [L,R=301,NC]
Got a little help from: http://www.inmotionhosting.com/suppo...t-via-htaccess

The two RewriteCond lines check if the hostname is pakistantribune.com.pk OR www.pakistantribune.com.pk if it is, then a permanent 301 redirect is made to the url http://pktribune.com/$1 the 1$ is the path from the old url now appended to the new domain name.
 
Reply With Quote
  #5  
Old 05-31-2017, 03:59 AM
convergentinfoware convergentinfoware is offline
Junior Member
 
Join Date: 08-08-16
Location: India
Posts: 35
iTrader: 0 / 0%
This is call domain forwarding. No need .htaccess for this. Follow the video you can easily do it - https://www.youtube.com/watch?v=qj91...ature=youtu.be
 
Reply With Quote
  #6  
Old 07-10-2017, 06:46 AM
biancaella biancaella is offline
Junior Member
 
Join Date: 07-10-17
Location: monaco
Posts: 4
iTrader: 0 / 0%
redirect from cpanel Add Redirect/permanent (301) /Redirect with or without www
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:35 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC