CNAME links to WordPress blog but redirects cgi-sys/defaultwebpage.cgi - wordpress

I've got IIS hosting site(www.site2.com) and wanted to add wordpress blog site on this website, but wordpress is PHP based so I used a tricky way.
I've got PHP hosting site(www.site1.com) so set up self-hosted wordpress blog on this site then adding CNAME on site2.com domain, I believed it should work.
So, installed wordpress in PHP hosting site(cpanel hosting) and create blog site on this wordpress, the url is www.site1.com/blogb. Then created subdomain from cpanel(blogb.site1.com) which linked to www.site1.com/blogb as root folder.
When I go to blogb.site1.com, it's working so good.
One last thing what I did is adding CNAME from site2 zone manager.
blog.site2.com -> blogb.site1.com
I think this should work because blogb.site1.com is working properly.
But when I go to blog.site2.com, redirected to "/cgi-sys/defaultwebpage.cgi" page then showed "SORRY ... If you are the owner of this website, please contact your hosting provider" message.
I cleared cache from my browner and tried from other browser but didn't work.
And added rewrite rule on .htaccess file on site1.com root folder but nothing worth.
I checked site URL from wordpress settings page, the site address(URL) was "blogb.site1.com" which was correct.
I believe if destination url of CNAME is working, the CNAME should work.
But when I try to access a file in destination folder using this url, blog.site2.com/readme.html, returns 404 not found while blogb.site1.com/readme.html is working.
So, CNAME(blog.site2.com) seems be pointing wrong directory.
Is there anything I missed or did wrong?
Thank you,
B

Related

Add sites in subdomain and not under wordpress multisite subdomain

I'm confused, I have a miltisite wordpress installation but also another site managing the customer areas.
So I have the site on the main domain www.domaine.com and i installed the wordpress multisite in a subdomain: sites.domain.com
So far everything is fine, but when I want to create a site, wordpress requires me to be subject to the subdomain like this: other.site.domain.com
I tried to modify the .htaccess and wp-config.php but when I go back to the site management it redirects me to www.domaine.com without my being able to access the wordpress multisite management...
How can I create sites with addresses under the domain and not under the subdomain like this:
other.domain.com and not like this other.site.domain.com
Thanks
It's ok, I can't access for two reasons.
One my wildcard is set on other folder than wp installation (blank page on subsite create)
Two I need to set address of new site for replace domain.com/other to other.domain.com
And now I can access to website and subsite.
Thank!
Thank you for your answer, I just tested but it does not react correctly.
When I put the configuration of DOMAIN_CURRENT_SITE on domaine.com I can no longer access the settings of the multisite network, I am redirected to the purchase site which is on the domain.
Another thing, if I therefore create a site in a subdirectory and not in a subdomain with the SUBDOMAIN_INSTALL configuration false, when I type test.domaine.com a blank page appears as if there was no site or if I Type site.domain.com/test/ it works.
I cleared the caches everywhere and tried again but nothing happened.
In case I expressed myself badly,
www.domain.com = The commercial site of the company
site.domain.com = Multisite management and sample site
other1.domain.com = Customer site created from site.domain.com
thanks again

Redirection Error When Accessing the wp-admin Page on a WordPress Site Hosted on GCP App Engine

I have a problem with my WordPress site hosted on GCP App Engine. When I try to access the wp-admin page, I first receive a 302 followed by a 301 that redirects me to the homepage.
I have already tried to deactivate my theme and all the plugins from the database, but that has not changed anything. I also added var_dumps to index.php in the wp-admin folder, but none of them are executed because the redirection happens before.
I also deleted my .htaccess file to make sure the redirection is not coming from there. Could you give me some leads to solve this problem? Thank you in advance.

website keeps redirecting into old wordpress url

i placed a wordpress site in a subfolder in public html and after a while i completely deleted the wordpress subfolder and i want to do something else with server storage but even though now there is no folders in public html in its completely empty when i go to the main domain or root directory it keeps redirecting me to old wordpress directory and there is no subfolder in public html so it gives 404 error and its weird because i have no files in public html.
i did put an index.php in public html and it did not work. site ignored that and got redirected to old wordpress subfolder.
please someone help...
when the wordpress site was up in the subfolder there was another wordpress site in root directory but i did not us it and i deleted that too i dont know if that has anything to do with it
p.s. i deleted everything that belonged to the old wordpress site including databases
It could be that your domain is set to direct to the subfolder.
Did you install wordpress via an software manager at your webhost?
They sometimes set the domain to that application folder automatically.
You should check your domain settings at your host, maybe there is the reason.
You may want to check you Domain and remove the url for the domain or subdomain. It can't resolve to the file path associated with it and that is what is triggering the 404.

Cannot able to access wp-admin page

I have a wordpress website in my ubuntu server. Eg, my website url is
xyz.com. when i'm trying to access wp-admin page it should be xyz.com/wp-admin. But it redirect to another url like xyz.com/xyz/wp-admin
Can anyone give solution for this issue?
Wordpress admin dashboard is /wp-admin from whatever directory your website is installed.
For instance, you have a website https://dijofrancis.com and wp is installed in the root directory then your admin url is https://dijofrancis.com/wp-admin
If you paste your .htaccess file (situated at the root of your webserver directory) we could help a little more.
I once had a similar issue when I stupidly made a global redirect with a wildcard on my website.
If you say that when you access:
xyz.com/wp-admin
it redirects you to
xyz.com/xyz/wp-admin
Then it might be a permalink issue.
Re-make your permalinks from WP dashboard.
Also, you can try to use
https://wordpress.org/plugins/wps-hide-login/
and test from another link (if issue is permalink, maybe WPS HL will interact with wp-admin in a way that will work for some reason)

301 redirect error with wordpress and apache

I've recently migrated a database from windows using bitnami (apache and wordpress) to a linux server (apache and wordpress). I'm able to access the website wp-admin, but every time I try to access the main site it repeatedly returns 301 errors.
I've tried disabling the .htaccess file (deleting, commenting everything out), but it still gets directed. I've disabled all plugins. I've looked into the themes I'm using but they don't have redirect url's like I've seen in other posts.
I'm wondering if the issue might be in how bitnami structures itself. the main documents are stored in website/wordpress/htdocs, whereas linux wordpress seems to store it directly in wordpress.
I've set sites-enabled home directory to
sitelocation/wordpress/htdocs
I've also set the wordpress address and site address to
http://website.com:80
What do I need to do to prevent the redirects, or set it up to work correctly?
if you haven't change your Site URL then.
Please change the Site URL and Home URL from database in wp_option table.
You need to mention new url in both section..
I had a trailing / on my siteurl which led to it not working. After removing that it worked.

Resources