Subdomain DNS address could not be found in share hosting - wordpress

I am using linux share hosting. I have hosted my laravel project in a subdomain test.example.com and the main domain installed by WordPress (Not multisite). When I am trying to access my subdomain it shows test.example.com’s server DNS address could not be found.
My WordPress (In main domain) htaccess file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

two things to check here
if you've added the sub-domain and made the laravel's public directory root directory.
secondly if there's any .htaccess files or code parts rather than those you've mentioned

Related

Apache access to example.com/app from different root directory

For now, I have following directories:
WordPress directory is connected with example.com domain. I would like to access my Zend app by example.com/app URL, but it is in separated directory. I tried to add rewrite rule in htaccess file in WordPress directory, but server responds me with 400 error. I tried that without success:
RewriteRule ^app/(.*)$ ../zend_app/$1
And now I am not sure what to do. I think about some php file to include something from zend_app folder or to create symlink inside WordPress directory pointing to zend_app folder. What solution is better? Maybe there is another solution? I am using shared hosting, so possibilities are limited.
EDIT:
Here is my whole htaccess file from WordPress:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^app/(.*)$ zend_app/$1 [L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

404 pages in wordpress after hosting

I have hosted my website on an amazon ec2 instance and it seems that all the pages except the home page are not working
example.
The requested URL /about/ was not found on this server.
Where I select in the permalink setting/Custom Structure '/index.php/%postname%/' it works fine, by the index.php is always part of the url.
The installation if Apache is fresh as well as the one for the wordpress. in my local host, everything is working fineWordpress
This is the .htaccess
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
is this an Apache problem or is it wordpress? and how can I solve it?

Mask a forwarded url to wordpress in a directory

I built a website for a client at clientsite.com. She has a new business and wants a wordpress site. So I installed wordpress in clientsite.com/wordpress. I can't install wordpress in the root because that's where her original site is and I need the wordpress site in its own folder. She has a domain with godaddy called newbusiness.com. I assigned that to bluehost (her host provider) and added it as an addon and now when you go to newbusiness.com you see the pages located at clientsite.com/wordpress, and newbusiness.com in the address bar. Exactly what I want. EXCEPT, when you navigate to any other page on the site, the address bar changes back to clientsite.com/wordpress. Not good.
I'm having a HORRIBLE time trying to figure out how to keep newbusiness.com in the address bar throughout the whole site. Please help!
One really simple solution is to add a few lines to the .htaccess file in your /wordpress folder. This file is created during the installation, so it should be there. It probably contains the following:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Try adding these 3 lines:
RewriteCond %{HTTP_HOST} !newbusiness.com$ [NC]
RewriteCond %{REQUEST_URI} clientsite\.com/wordpress [NC]
RewriteRule ^(.*)clientsite\.com/wordpress(.*)$ $1newbusiness.com$2 [L,R=301]
right before </IfModule>

Setting up a another website on a wordpress folder

I am setting up a website inside a wordpress installation folder.
So it's like:
http://mysite.com/newsite/
Primarily, http://mysite.com is a wordpress installation, now I want to set up another site*(not a wordpress website)* on that directory which is newsite,
So basically it looks like this mysite/newsite/
When I go to that link, it changes the URL and leads me to a page of mysite page. I think maybe because of the .htaccess of the wordpress installation.
How can I access on my newly setup website without being redirecting me to http://mysite.com page?
PS:
Wordpress .htaccess configuration:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Your help will be appreciated!

internal server error in subdomains

I installed worpress to my main domain abcd.com. My addon domain name is fghi.com, when i try to access any worng page form addon domain for example fghi.com/fdsf i see internal server error.
I am using .htaccess file in root directory of wordpress installation. Here is code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
anybody know the correct solution?
Wordpress can't be successfully accessed from your secondary domain because the Wordpress installation site url is set to one address. In your case, Wordpress recognizes "abcd.com" as the site url, and therefore any other url, even though it may point to the correct folder, will cause an internal service error

Resources