Subdomain redirect to cgi-sys/defaultwebpage.cgi - apache

I'm having this problem: when I access the URL "bobbabr.org", it's normal, but when I access the subdomain "ibobba.bobbabr.org", I'm redirected to "/cgi-sys/defaultwebpage.cgi".
I already try to delete the .htacess, re-create the subdomain and the folder, nothing worked.
I have two .htacess on the host: one in the root (/public_html) and other in the subdomain folder (/public_html/ibobba).
I don't know what to do. Any tips?

Try clearing your cache. Sometimes the problem is browser-specific.

Related

When typing my website's URL with a subfolder, why does the subfolder name get combined with the URL name?

For some reason, when I type in my website's short-form URL (without WWW), any subfolders get smushed into the end of the domain name, and I end up getting my ISP's error page.
hudsons.network/weather as an example
But entering my website's URL with WWW works just fine.
www.hudsons.network/weather
At the same time, just typing in hudsons.network redirects to www.hudsons.network, the way I had configured it in Apache.
Here's my configuration:
I have two Virtual Hosts, one for hudsons.network (the default) and another for www.hudsons.network (my own)
In the configuration file for the default host, I have this line:
Redirect permanent / http://www.hudsons.network
I've seen similar behavior on Safari, Opera, and Internet Explorer, and I think it has to do with my website's redirects. Why is this happening, and what rules do I need so that my site redirects the way I expect?
I've found the answer here. I also deleted the RewriteBase line because my config file is in /etc/apache2/sites-available. Works like a charm!

Subdomain is redirecting to primary domain files

I have created a subdomain(development.domain.com.np). Everytime when i hit the subdomain url it shows subdomain link but uses primary domain index.php file.
But when remove index.php file from my subdomain and replace it with index.html it works fine.
I am not able to figure out what is causing this.
I have checked redirects and logs but everything seems fine.
Do I have to add anything in htaccess file?. Any help is highly appreciated. Thank you.
You need to create 2 virtualhosts in your apache configuration pointing to 2 different documentRoots: one for each virtualhost. This way each virtualhost will handle just one domain: the documentRoot in each virtulahost will show only the files related to that specific domain.

Point subdomain to root of main site on cPanel

I need to point a subdomain (sub.example.com) to the same root as the main site (example.com). So when someone accesses sub.example.com, the same homepage is displayed.
I tried creating the subdomain and pointing it to /public_html instead of /public_html/sub, but if I access sub.example.com I get redirected to sub.example.com/cgi-sys/defaultwebpage.cgi, but if I access sub.example.com/index.php I get the right homepage.
My question is, how to properly point a subdomain to the root of the main site on cPanel?
Any help is very much appreciated.
cPanel redirect to "cgi-sys/defaultwebpage.cgi" when there is not index page present in document root. But as you said sub.example.com/index.php is working so I am not. Add the below lines in .htaccess in public_html folder and give it a try again. Create the .htaccess file if it's not present
DirectoryIndex index.php
Other option is to put a redirect for the subdomain with the domains homepage url
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/ReDirects

Redirecting into Subfolder and masking this with Apache Rewrite

i got a subfolder inside my domains root directory, lets call it "domain.tld/subfolder". Inside this "subfolder" there are more subfolders, one of them is called "public". Now when I request "domain.tld/subfolder" i want the user to see the content of "subfolder/public", but without changing the URL to "domain.tld/subfolder/public".
Any Ideas on this??
http://www.htaccessredirect.net/
Use .htaccess to redirect.

What's causing this forced redirect?

I do not have root access to the site site.com but I have access to a subdomain me.site.com
I add an index.php (or any file and or folder for that matter) to the root folder (public_html) of this subdomain but everytime I try to go to me.site.com/index.php I get redirected to www.site.com
The .htaccess file in this subdomain is currently blank.
Why might this be happening?
Thanks!
I'm afraid that .htaccess in subdomain folder can't override the .htaccess in root, and at the moment the .htaccess in your root folder is current affecting the subdomain, in which it redirects all visits to the subdomain to root. Imagine that .htaccess from your subdomain folder redirect visits to the directory itself and .htaccess from root also redirects visits to subdomain back to the root itself, that's gonna be a mess.
Well, that's what I think about it in my opinion. Have you tried contacting the one who own root folder to consider about this?