News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

My url keeps redirecting to another domain on the same server, whats going on?

Started by JustinPeck, January 21, 2019, 04:21:25 PM

Previous topic - Next topic

JustinPeck

Forum URL is thehobbyfarmers, but various links and actions will switch to cabincreekgetaway/thehobbyfarmers. thehobbyfarmers is not under cabincreekgetaway in my cpanel, and thehobbyfarmers/ is directly under my pulic_html file. I have no idea what could be causing this. There are no redirects set up, and all of the files in my settings folder are correct.



########## Maintenance ##########
# Note: If $maintenance is set to 2, the forum will be unusable!  Change it to 0 to fix it.
$mtitle = 'Maintenance Mode';      # Title for the Maintenance Mode message.
$mmessage = 'Okay faithful users...we\'re attempting to restore an older backup of the database...news will be posted once we\'re back!';      # Description of why the forum is in maintenance mode.


########## Database Info ##########
$db_type = 'mysql';
$db_server = 'localhost';
$db_name = '***********************';
$db_user = '*******************';
$db_passwd = '********';
$ssi_db_user = '';
$ssi_db_passwd = '';
$db_prefix = 'smf_';
$db_persist = 0;
$db_error_send = 1;

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
$boarddir = '/home3/cabincr2/public_html/thehobbyfarmers';      # The absolute path to the forum's folder. (not just '.'!)
$sourcedir = '/home3/cabincr2/public_html/thehobbyfarmers/Sources';      # Path to the Sources directory.
$cachedir = '/home3/cabincr2/public_html/thehobbyfarmers/cache';      # Path to the cache directory.

########## Error-Catching ##########
# Note: You shouldn't touch these settings.
$db_last_error = 1516969694;

$image_proxy_secret = 'e58130842bfa5c4aeefa';
$image_proxy_maxsize = 5190;
?>

drewactual

the name of your account is cabincr2?  hobbyfarmers and cabincreek are both under that account? it directs (sometimes, often) to cabincreek instead of where it should, hobbyfarmers?.... just trying to make sure I understand your issue... i think this is right?

do you manage this server or is it managed by someone else?

what is in the (the directory the forum is located) .htaccess file?  and.... how many levels deep is the server applying rules in htaccess files?

JustinPeck

All assumptions are correct,

Account name is cabincr2, it is a hostmonster account, I am the owner of the account.

The folder the forum is in is directly under public_html. Here is the content of my htaccess file.

QuoteRewriteEngine on

# Set PHP handler to application/x-httpd-php54s on Wed Nov 11 19:06:04 MST 2015.
# Changed PHP handler from application/x-httpd-php54s to application/x-httpd-phpbetas on Wed Nov 11 19:06:04 MST 2015.
AddHandler application/x-httpd-phpbetas .php
RewriteCond %{HTTP_HOST} ^thehobbyfarmers\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.thehobbyfarmers\.com$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.php\/?(.*)$ "http\:\/\/thehobbyfarmers\.com\/$1" [R=301,L]


drewactual

what have you changed recently? did this just start out of the blue?

JustinPeck

I started the forum in 2016 but got busy with life and abandoned it. I have since started a facebook group of a similar theme that has developed over 1k members and am looking to start using the forum again. Not sure what changed over the last couple years that threw things off. I don't remember making any changes. But it's possible.

Thank you for your help by the way!

Illori

can you provide the links that are seeing the issue? this will help us troubleshoot what is going on.

JustinPeck

Yes, I just wasn't sure link sharing was allowed.

Try going to:
http://thehobbyfarmers.com [nofollow]

and you will end up at

http://cabincreekgetaway.com/thehobbyfarmers/index.php?board=1.0 [nofollow]

I can't figure out why my forum wont stay in it's own domain and how it got associated with another domain on my account. It is not nested in the file and the domain was purchased separately. The websites are completely unrelated.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

drewactual

is there a www folder in your cpanel, under cabincreekgetaway, that has hobbyfarmers directory in it by chance?

JustinPeck

Try going to a post and back to home watching the domain, it skips back to cabincreek at some point, I'm not sure what triggers it because different link clicks trigger it at different times.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JustinPeck

yes,cabincreekgetaway.com is the primary domain and thehobbyfarmers.com [nofollow] is an addon.

I'm not sure why its doing it to me if its not to you, what browser are you using? I've tried chrome on 2 different computers and inevitable end up back at the other domain.

Tried using safari on my wife's macbook and login results in timeout and register just keeps circulating the agreement.

Sir Osis of Liver

I'm not getting it in IE11 or FF61.  Do you know registration is broken?  Agreement loops back to agreement.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JustinPeck

I think its still something to do with the domains, registration loops and trying to log in I get:

An Error Has Occurred!
Your session timed out while posting. Please go back and try again.

or

Unable to verify referring url. Please go back and try again.



Even to log into the admin account.

Is there a way to back up the existing posts/categories and try a fresh install? Or is there still hope to fix this.

Sir Osis of Liver

All content (posts, members, settings, etc.) is in your database.  Make sure you have a good backup.  Upload a clean set of files, run repair_settings.php to fix paths, try running the forum without the .htaccess file.

You can specify a redirect for an addon, but it wouldn't be intermittent, and I don't see it at all.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JustinPeck

I think I fixed it.

I downloaded and installed a fresh copy of 2.0.15 under http://thehobbyfarmers.com/forum/ [nofollow] so I would still have my original files under the main folder if I needed them for anything. It seems to work without any issues so I'm just going to redirect http://thehobbyfarmers.com [nofollow] to the /forum folder.

I did not touch the database and instead directed the new install to use the old database.

JustinPeck

UPDATE: I almost fixed it, I am now able to log in, register, and post without being redirected so it solved that problem. However when I try to view a profile I see the following.

This page isn't working thehobbyfarmers.com [nofollow] is currently unable to handle this request.
HTTP ERROR 500

Tonyvic

Maybe it's just my pc as nobody else has mentioned it, but Avast doesn't like the URL. :-\

JustinPeck

Thanks for letting me know tonyvic, I'm experimenting with crypto mining vs ads. Hadn't seen any side effects yet but I guess for some reason avast doesn't like it.

I'm still receiving an error when attempting to visit the member page and also upon filling out a registration.

Sir Osis of Liver

Did you try removing .htaccess?  Registration doesn't work, throws a 500 when password fields are populated.  Something outside the forum is screwing it up.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

drewactual

also, if you have a user.ini or a php.ini in your forum's top directory, can you share its(their) contents please?

Advertisement: