This Help forum is for issues relates to the latest release (1.7.7). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."
  • Page:
  • 1

TOPIC:

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #1

  • Orion68
  • Orion68's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
Dear all,

Just wonder if it is possible with the 1.7.7 version.
I have installed 1.7.7 webtrees on my website and it works fine. After that I tried moving to my subdomain like www.mydomain.com instead of www.mydomain.com/webtrees but it failed shown the requested URL was not found on this server error 404. The changing of subdirectory to subdomain works as I already tested (via .htaccess). Any help would be very appreciated.
Thanks

Best Regards
Orion68

Please Log in or Create an account to join the conversation.

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #2

  • ToyGuy
  • ToyGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
  • Posts: 4925
Did you simply move the installation or did you change the SQL and config.php?
Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #3

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14515
This should work, no problem.

It's hard to guess what might be wrong, as you don't give many details.

Perhaps elaborate on "tried moving my subdomain". What exactly did you do?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #4

  • Orion68
  • Orion68's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
thanks guys for your quick respone and advice and sorry for my explanation.
Firstly I've installed webtrees on my website and it works fine. The webserver is an apache server and the database mysql (Apache/2.2.22 (Debian & MySQL client version: 5.5.52). I used https and another port 8080 for that, but it works fine like www.mydomain.com:8080/webtrees with webtrees is a subdirectory. Now I want to use accessing my webtress using subdomain like subdomain1.mydomain.com:8080/ instead. It should redirecting automatically to www.mydomain.com:8080/webtrees via .htaccess.

I can confirm the redirecting work because I have few subdirectories and via this way, redirecting from subdirectory to subdomain work fine for all of them. But it did not work only for webtrees shown the requested URL was not found on this server error 404.

In the .htaccess I added for each subdirectory following lines

RewriteCond %{HTTP_HOST} ^subdomain1\.mydomain\.com:8080$
RewriteCond %{REQUEST_URI} !^/subdomain1/
RewriteRule (.*) /subdomain1/$1

and in the root of www, subdomain1 is a link of webtrees so the redirecting should be exactly pointing to www.mydomain.com:8080/webtrees

So it would be great if you can advice me what should be done without a new installation that it will work accessing simply via subdomain instead of calling my website with subdirectory.

Thanks a lot for your help.

Regards Orion68

Please Log in or Create an account to join the conversation.

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #5

  • Orion68
  • Orion68's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
One more information: I use https and port 8080 and not http. So my issue occured trying redirecting www.mydomain.com:8080/webtrees (it works fine) to subdomain1.mydomain.com:8080/
Thanks a lot!

Please Log in or Create an account to join the conversation.

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14515
I'm guessing there's something wrong with your rewrite configuration.

Have you enabled rewrite debugging? e.g. something like this?

RewriteEngine On
RewriteLog "/var/log/apache2/rewrite.log"
RewriteLogLevel 3
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #7

  • ToyGuy
  • ToyGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
  • Posts: 4925
Orion
Do you have the subdomain set up in DNS?
I have hundreds of subdomains using Apache (on a Mac). I have all of the subs set up in my GoDaddy DNS as CNames and then in my vhost information in Apache: sub1.mydomain.xxx = mydomain.xxx/sub1 They are equivalent. I can access it directly using the /sub1 folder, or using DNS with the subdomain.
Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #8

  • Orion68
  • Orion68's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
UPDATE: I have changed subdomain1 = webtrees, it works if I open the URL webtrees.mydomain.com:8080/index.php the same way like open the URL mydomain.com:8080/webtrees, so the redirecting works.
BUT: webtrees.mydomain.com:8080/ still does not work, so the problem here why index.php is not loading automatically. I can confirm index.php is loading by another sites (i.e. mydomain.com:8080/webtrees), but in case with this subdomain webtrees.mydomain.com:8080 it does not work.

Any idea why? I have tried adding "DirectoryIndex index.php" to the .htaccess file - it does not work, too.

@ GREG: thanks for the advice with enabling rewrite log, I will try but as I mentioned above, redirecting should work.

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #9

  • Orion68
  • Orion68's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
Santa, yes, the subdomain is setup in DNS

Please Log in or Create an account to join the conversation.

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #10

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14515
> Any idea why? I have tried adding "DirectoryIndex index.php" to the .htaccess file - it does not work, too.

In situations like this, my next step would be StackOverflow.

stackoverflow.com/search?q=apache+rewrit...ctoryindex+index.php
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Moving from subdirectory ro subdomain not possible 4 years 7 months ago #11

  • Orion68
  • Orion68's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
thanks Greg, the issue is solved.

I found out in my setting "Website preferences", "Website URL" was empty, just added the redirecting URL webtrees.mydomain.com:8080/, it work like a charm

By the way, thanks for your great support and nice app. I also updated it successfully to the current 1.7.8 version

Cheers Orion

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum