Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
help with htaccess redirect
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- help with htaccess redirect
- « Previous
-
- 1
- 2
- Next »
Re: help with htaccess redirect
26-07-2015 11:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
'Other domain' thoughts.
Since WordPress settings have a single URL, any visitors who arrive on the site using, and retaining, an alternative domain address would appear to change sites (in the address field) as soon as they click an article link. Potentially that's confusing so better, in my view, to change at the start. This would also avoid Google seeing the home page as duplicate content. On that basis any reference to an 'other domain' should be a permanently-moved redirect to the primary URL
I assume the other sites are currently on Homepages; there is no reason why the permanently-moved redirect shouldn't be done from there no need to move them to the ccgi server. This would require an .htacess file in /htdocs on Homepages with contents like
You mentioned the sites currently have pages (file paths) on Homepages - I have assumed these will be meaningless to WordPress so ignored them in the redirect.
If these sites are currently in subdirectories defined in the Domain Control Panel I am unsure if Apache backtracks into /htdocs to look for a .htaccess . If you find the above code is ignored, you could temporarily replace it with the one line .htaccess
browse to one of the sites and see if you *do* get that 500 error page. If not it confirms the file is not being read by Apache. The problem can be fixed by changing control panel settings to point the domains to the /htdocs root.
Hope this makes sense.
David
Since WordPress settings have a single URL, any visitors who arrive on the site using, and retaining, an alternative domain address would appear to change sites (in the address field) as soon as they click an article link. Potentially that's confusing so better, in my view, to change at the start. This would also avoid Google seeing the home page as duplicate content. On that basis any reference to an 'other domain' should be a permanently-moved redirect to the primary URL
I assume the other sites are currently on Homepages; there is no reason why the permanently-moved redirect shouldn't be done from there no need to move them to the ccgi server. This would require an .htacess file in /htdocs on Homepages with contents like
RewriteEngine On
# Redirect other domains to primary one
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.co\.uk$ [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.com$ [NC]
RewriteRule (.*) http://www.domain.co.uk [R=301,L]
You mentioned the sites currently have pages (file paths) on Homepages - I have assumed these will be meaningless to WordPress so ignored them in the redirect.
If these sites are currently in subdirectories defined in the Domain Control Panel I am unsure if Apache backtracks into /htdocs to look for a .htaccess . If you find the above code is ignored, you could temporarily replace it with the one line .htaccess
This should give a 500 Internal Server Error
browse to one of the sites and see if you *do* get that 500 error page. If not it confirms the file is not being read by Apache. The problem can be fixed by changing control panel settings to point the domains to the /htdocs root.
Hope this makes sense.
David
David
Message 16 of 22
(660 Views)
Re: help with htaccess redirect
31-07-2015 10:12 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi, don't want to hijack this thread, but I could do with a bit of help here too ..
I have a wordpress site running quite nicely in my ccgi space, and have been trying to add a second (different) site which I can't seem to get working properly.
The original website is under its own subdirectory (eg public/subdirone/) and accessed using my domain name (eg. domainone.co.uk).
I have set up the .htaccess file in public which (seems) to have been working fine.
Having now added the second (separate) wordpress site in its own subdirectory (public/subdirtwo/), and asked plusnet to point my second domain name to my ccgi space, I have amended the .htaccess in /public to try and redirect the two domains to the relevant directory.
The second redirect doesn't seem to work and just goes to a random (so far untraceable) error page. I'm not sure whether my htaccess is incorrect, the plusnet redirect hasn't worked or something else is amiss.
This is the version of .htaccess I currently have (under /public/):
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?domainone\.co\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirone/
RewriteRule (.*) /subdirone/$1
RewriteCond %{HTTP_HOST} ^(www\.)?domaintwo\.co\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirtwo/
RewriteRule (.*) /subdirtwo/$1
The domain configuration on my force9 account is identical for the two domains ('a' record for domain name, 'cname' www - ccgi etc) and have waited a few days from switch over (the second domain used to point to my personal force9 account) for dns to propagate.
I have put a basic htm file in the second directory as a test and can access that by using ccgi.username.force9.co.uk/subdirtwo/ - using the domaintwo.co.uk just fails to a wp 'not found' page.
Am stumped as to why second rewrite doesn't seem to work. Is there any way to trace where the url is landing?
Any help appreciated ...
I have a wordpress site running quite nicely in my ccgi space, and have been trying to add a second (different) site which I can't seem to get working properly.
The original website is under its own subdirectory (eg public/subdirone/) and accessed using my domain name (eg. domainone.co.uk).
I have set up the .htaccess file in public which (seems) to have been working fine.
Having now added the second (separate) wordpress site in its own subdirectory (public/subdirtwo/), and asked plusnet to point my second domain name to my ccgi space, I have amended the .htaccess in /public to try and redirect the two domains to the relevant directory.
The second redirect doesn't seem to work and just goes to a random (so far untraceable) error page. I'm not sure whether my htaccess is incorrect, the plusnet redirect hasn't worked or something else is amiss.
This is the version of .htaccess I currently have (under /public/):
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?domainone\.co\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirone/
RewriteRule (.*) /subdirone/$1
RewriteCond %{HTTP_HOST} ^(www\.)?domaintwo\.co\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirtwo/
RewriteRule (.*) /subdirtwo/$1
The domain configuration on my force9 account is identical for the two domains ('a' record for domain name, 'cname' www - ccgi etc) and have waited a few days from switch over (the second domain used to point to my personal force9 account) for dns to propagate.
I have put a basic htm file in the second directory as a test and can access that by using ccgi.username.force9.co.uk/subdirtwo/ - using the domaintwo.co.uk just fails to a wp 'not found' page.
Am stumped as to why second rewrite doesn't seem to work. Is there any way to trace where the url is landing?
Any help appreciated ...
Message 17 of 22
(660 Views)
Re: help with htaccess redirect
31-07-2015 1:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The content of that .htaccess looks OK to me. You mentioned Plusnet pointing domaintwo to your ccgi space - as well as changing DNS have they also added domaintwo to the ccgi server configuration aliases? I wonder if that is configured correctly?
For checking purposes I suggest disabling the domaintwo redirect lines in .htaccess (insert # as the first character in each of the three lines). If you then browse to each of
www.domainone.co.uk
ccgi.username.force9.co.uk/subdirone/
www.domainTWO.co.uk/subdirONE/ ; (capitals for emphasis)
they should all take you to the WordPress front page for the domainone installation.
ccgi.username.force9.co.uk/subdirtwo/
www.domaintwo.co.uk/subdirtwo/
should take you to the WordPress front page for the domaintwo installation.
Do these behave as expected?
David
For checking purposes I suggest disabling the domaintwo redirect lines in .htaccess (insert # as the first character in each of the three lines). If you then browse to each of
www.domainone.co.uk
ccgi.username.force9.co.uk/subdirone/
www.domainTWO.co.uk/subdirONE/ ; (capitals for emphasis)
they should all take you to the WordPress front page for the domainone installation.
ccgi.username.force9.co.uk/subdirtwo/
www.domaintwo.co.uk/subdirtwo/
should take you to the WordPress front page for the domaintwo installation.
Do these behave as expected?
David
David
Message 18 of 22
(660 Views)
Re: help with htaccess redirect
31-07-2015 3:08 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
David, thanks for the reply.
The direct ccgi.username .. url does indeed work in both instances, it is the new domain name that just goes to a seemingly random wp page : 'Not Authorized to View This Page [CFN #0004]' , with no way of determining quite where that page is (?). Changing the htaccess seems to have no effect.
As said, this domain move has only been actioned in the last few days by plusnet tech, a DNS check shows the domain pointing to my ccgi space, so perhaps it is the server configuration aliases ??
Is there a way to check that? Or do I need to ask plusnet ...
The direct ccgi.username .. url does indeed work in both instances, it is the new domain name that just goes to a seemingly random wp page : 'Not Authorized to View This Page [CFN #0004]' , with no way of determining quite where that page is (?). Changing the htaccess seems to have no effect.
As said, this domain move has only been actioned in the last few days by plusnet tech, a DNS check shows the domain pointing to my ccgi space, so perhaps it is the server configuration aliases ??
Is there a way to check that? Or do I need to ask plusnet ...
Message 19 of 22
(660 Views)
Re: help with htaccess redirect
31-07-2015 3:33 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
It does look as though the domain alias for domaintwo could be incorrectly configured. That is something Plusnet would have to check.
Have you checked the content of any .htaccess files in your ccgi root ( / ) and that WordPress created in /public/subdirtwo ?
David
Have you checked the content of any .htaccess files in your ccgi root ( / ) and that WordPress created in /public/subdirtwo ?
David
David
Message 20 of 22
(660 Views)
Re: help with htaccess redirect
31-07-2015 4:09 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Should be sorted. I've added some comments to your open ticket Andy.
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
Message 21 of 22
(657 Views)
Re: help with htaccess redirect
31-07-2015 4:58 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks Bob (and David) all seems ok now.
Message 22 of 22
(657 Views)
- « Previous
-
- 1
- 2
- Next »
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- help with htaccess redirect