Apache :: HTAccess For Main Domain Not Affect Subdomanis
Jul 1, 2015
I have maindomain.com addon-1.com addon-2.com addon-3.com
The addon domains are folders in main domain's root.
The problem is maindomain's htaccess is affecting the addon domains. I want the add on domains to have their own htaccess. The addon domains should not be influenced by main domain's htaccess
I did some research online and someone says this method works:
Code:
RewriteCond %{HTTP_HOST} ^(www.)?addon_domain.com
RewriteRule .* - [L]
But the above assumes you only have one addon domain. I have multiple.
Which code is correct? This
Code:
RewriteCond %{HTTP_HOST} ^(www.)?addon-1.com
RewriteRule .* - [L]
RewriteCond %{HTTP_HOST} ^(www.)?addon-2.com
RewriteRule .* - [L]
RewriteCond %{HTTP_HOST} ^(www.)?addon-3.com
RewriteRule .* - [L]
Or this
Code:
RewriteCond %{HTTP_HOST} ^(www.)?addon-1.com
RewriteCond %{HTTP_HOST} ^(www.)?addon-2.com
RewriteCond %{HTTP_HOST} ^(www.)?addon-3.com
RewriteRule .* - [L]
do I put the code at the beginning of main domain's htaccess?
View 3 Replies
ADVERTISEMENT
Jan 19, 2008
I currently have a web VPS hosted with FDCServers.net and after 5 days of switching to it i am getting massive HTTP requests. When i login to WHM and hit apache status i have many requests per second by multiple IP's that are going to pages that simple don't exist. Currently my hostname for the server is set at web-01.optical-hosting.com which is what the requests are being sent to. I am also having a DNS issue because when i put http://web-01.optical-hosting.com in the web browser it displays the first account's site under "list accounts" in cpanel. Can someone please help me fix both of these issue's? i will post an apache log in a second post as it is long. Also, these are from overseas. please someone help me with this i have Aim and Msn.
View 4 Replies
View Related
Mar 30, 2014
I'm trying to set up a login script on twenty subdomains that will be checked on another subdomain. I've found this example for different domains and figure it should be simple enough to utilise but my ereg is crappy
<IfModule mod_headers.c>SetEnvIf Origin "http(s)?://(www.)?(domain1.com|domain2.com)$" AccessControlAllowOrigin=$0$1Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin</IfModule>
View 4 Replies
View Related
May 2, 2009
How do I change park domain to the main domain and vice versa for the main domain?
I have cpanel, centos, whm. Wondering if this will effect down time and such?
View 5 Replies
View Related
Mar 14, 2008
I have domain1.com as the main domain that I am using with cpanel and domain2.com as an addon domain that points to a different directory.
I want to move domain1.com to another server and I would like to know if I can make domain2.com the main one
View 3 Replies
View Related
Apr 14, 2007
I know from past experiences, a VPS is not suppose to be setup on a sub domain for the main domain name account. My VPS was setup on a sub domain which is not allowing my domain name to resolve the with the DNS server. How to fix this issue? I have been speaking with support all day, and we have fixed a few minor issues but my major concern is yet to be fixed and I'm still sending support tickets ( and they are working on it ) but it's been an all day afair...any sugestions from the peanut gallery?
View 2 Replies
View Related
Apr 24, 2009
I have recently just purchased an unmanaged vps from poundhost. I have never used a vps before so we shelled out for a WHM control panel! The issue now is that we do not have a nameserver set up or any main domain to use as a nameserver.
We have the main IP address and two additional IP's given to us by poundhost, how do I use these to start hosting and managing websites?
View 3 Replies
View Related
Jan 23, 2007
I have a domain name as per my sig. I am also creating a subdomain totally in contrast with that site below. My primary domain has one page on it so i would like to:
a) delete the one page on my primary domain
b) Make the contents of my subdomain my primary domain. e.g my domain is www.info-peep.com, my sub will be example.info-peep.com........i would like to make example.info-peep.com : www.info-peep.com......that make sense, as really the sub will be my main site.
Basically wanting to transfer the contents of my sub to my primary. So when people click info-peep.com, it will be the sub's site. Another thing to note is that i am using RVsitebuilder (WYSIWYG) that my web host provides. Also BEAR IN MIND the WYSIWYG editor does not allow me to move pages (sucks) or to copy the page contents.
View 7 Replies
View Related
Nov 26, 2007
I have my main domain (domain.com) and it is where all my sites and customer sites are pointed to (ns1.domain.com and ns2.domain.com).
I just purchased a VPS and have made (domain.com) my main domain as I want it to be because of keeping the nameservers the same for my clients.
My vision is this, I will transfer all the sites from my old cPanel account to my new DirectAdmin account. I have setup a time to let my clients know not to update any content on their sites. At that time I will then download the sites from the cPanel account to the DA account. I will then move my main domain (domain.com) over as well and then change the name server registries at namecheap.
I understand some things can get lost in this switch, but ALL clients are aware of this and understand. They will still have access to the old server via the IP address to check for misdirected mail.
Is this the simplest way to get this done?
Is there a better way, with using the main domain?
View 1 Replies
View Related
Apr 3, 2009
When trying to make a subdomain on my main cpanel domain, through cpanel, it acts like it is making it, and adds the dns entry, but it does not work. All other domains work fine.
I submitted a ticket to buycpanel, they asked for the login information this morning, and have not heard back from them. This has happened every since they installed cpanel.
I am hoping its something simple that one of you knowledgeable people may know how to fix.
View 2 Replies
View Related
May 26, 2014
when I try to change main domain, e.g. domain.ru to domain.com, I see that Application Pool changed only for main domain, all additional domain use old Application Pool.
View 1 Replies
View Related
Nov 20, 2008
Lets say I have abcd.com as the main domain on cpanel. abcd.com has 10 subdomains.
Basically what I want to do is when I do an addon domain or parked domain I want the subdomains to basically point to abcd.com automatically. Let's say the addon/parked
domain is 1234.com
For example I have
sub.abcd.com as the main subdomain
so when I type in sub.1234.com I want it pointed to sub.abcd.com internally meaning the script/files from there however in the browser show as if it were sub.1234.com
View 4 Replies
View Related
Mar 29, 2008
Whenever I try to create a user account I get the following error
Sorry, resellers are not permitted to create subdomains of the server's main domain
My server domain is www.domain.com and reseller is trying to create a user account like new.domain.com . It was working fine a few weeks back but I think since I upgraded the cpanel and whm, it doesnt allow creation of accounts anymore.
Could someone help me to fix this error please?
I own the VPS and the reseller and all other accounts.
View 3 Replies
View Related
Jul 14, 2007
i have a vps and although i can send mails without problem from my main root account, sending via any of the child accounts created for customers results in their email being picked up as spam (in hotmail at least).
To clarify, mydomain.com is my main name. Email can send without problem,
customersdomain.com, hosted on the same machine, when sending emails they are picked up as spam. The mx dns entries in the zone file are set (by default to) customersdomain.com. and for all the child domains customer1domain.com. etc.
Do i need to ask the datacenter to add a reverse dns entry for mail.mydomain.com?
Is this an issue with the mx records for the hosted domains? Should i change the hosted domaims mx entry on the customers domains to mail.mydomain.com?
I know the ip isnt blacklisted because exactly the same email goes through when sending from the mydomain.com email addresses.
View 14 Replies
View Related
Mar 21, 2015
I am using Web admin edition .I need to create two subdomains namely sub1.example.com and sub2.example.com with different IP address. So i need to create two webspaces since a webspace cannot have two domians pointing to two different IP. So now to I can create two webspaces set to different IP. But to create sub1.example.com in one webspace and sub2.example.com in another webspace , i need main domain example.com in both the workspace. But if try to create example.com in second webspace it already exists.Because it exists in another webspace. Actually i dont want to create example.com in both webspace. i need to its subdomain in different webspace.
So one solution is to create example.com and sub1.example.com in one webspace and create another webspace using Adding new webspace and specifying domain name as sub2.example.com. But i don't know does the second subdomain will work properly without creating main domain.
View 1 Replies
View Related
Aug 19, 2014
I have a problem with on domain. The domain is the "main-domain" of the customer but it is not shown in the overview /smb/web/view
Not with the User logged in and not with the admin logged in.
But I can change setting, when I call the detail-page manually: /smb/web/overview/id/d:26
I tried to lock/unlock the domain/account, but nothing worked.
I could not see any mistakes in the database.
Deleting and adding the domain would be a trick, but because of having many domains/subdomains and dns-entries this is not my first choice.
View 2 Replies
View Related
Sep 28, 2014
I'm setting up a SAAS service which is built on top of Laravel. To put it simply the service itself knows whether its being called from a sub.example.com or just example.com and serves a correct response accordingly. So going to sub.example.com will use the same index.php file as example.com but the routes and controllers within the application will provide a different response. sub.example.com will show a tenant login page where as example.com will show a new tenant subscription page or something else.
So when someone new subscribes I add a new entry to the database with a subdomain name for them and when a request comes from that subdomain and they are logged in it will show them their information. Easy right.
There is a problem though with setting it up with Plesk. When I add a wildcard subdomain, it will look for /subdomains/sub/ for the files which is a bit problematic since I want it to serve the files from the same place as the domain example.com.
Is there a way to configure that so that regardless of the subdomain it will try and serve the exact same content as my main domain?
View 2 Replies
View Related
Mar 22, 2008
I have the following Apache redirect code in .htaccess:
RewriteRule ^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$ /domain.com/app/modules/content/latestNews.php?id=$1 [L]
This redirect works fine on Apache 2.2.8, but doesn't work on Apache 1.3.41
The following is the entry from error_log:
RewriteRule: cannot compile regular expression '^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$'
A simple Rewrite is working fine in Apache 1.3, but the above regualar expression doesn't seem to be working on Apache 1.3. Does anyone know whether Apache 1.3 doesn't support it?
View 3 Replies
View Related
Jan 1, 2007
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
That's the wordpress .htaccess
What makes me wonder is if we delete RewriteCond %{REQUEST_FILENAME} !-f, it won't work.
As if there is a recursion. However, there can't be a recursion given the [L] thing right?
View 0 Replies
View Related
Nov 29, 2014
My requirement is to redirect all hosted domain's webmail to the main hosting webmail url .. how can this be achieved ?
View 7 Replies
View Related
Oct 21, 2007
I have what I think is kind of a unique situation with a site move and Google is not turning up an answer that seems to work.
My site is currently in this format:
www.mydomain.com/site/file.html
And I am "moving" it but also switching from html to php, so the same file would be found at:
site.mydomain.com/file.php
I want to redirect users going to the old pages to their equivalent on the new site, however this is a little bit of a problem because this is a normal subdomain - it is the same directory as before but now there are php versions of the html files.
Right now I have all of the http files redirecting to their php equivilents, but I don't believe this is a desirable solution. Also it creates a problem when people go to www.mydomain.com/site (not indicating a specific file; just the subdir root) because I have www.mydomain.com/site/index.html redirecting to www.mydomain.com/site/index.php.
Quite a mess.
My first option is to put the redirects in the htaccess file on the "old" site. But is this a problem because there are over 500 pages on the site? Does it create a heavy server load because any requests force the server to serve a huge htaccess file?
The next alternative seems the most preferable although I'm not sure how to do it. It seems it could use wildcards so that anyone going to *.html gets directed to *.php or something like that. The only problem is that there are a small number of files that were removed completely and do not have php equivilants (about 5 or 6) and would need to redirect to the index.php in the root
View 14 Replies
View Related
Jun 14, 2014
I have re-built a website on a new domain. Now I want to redirect http://www.olddomain.com/anything or http://olddomain.anything to www.newdomain. Because the file structure is totally different, I want all redirections to go to the Home Page of newdomain.
Initially, I used Standard forwarding in the Plesk CP but that attempts to keep the filename the same. So www.olddomain.com/wibble tries to go to www.newdomain.com/wibble. But wibble dies not exist on the new domain.
Should I use htaccess with physical hosting instead on olddomain.com? Is the following correct?:
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com [R=301,L]
Will that basically cover any request? Anything that people have saved or which appears in Google searches, no matter whether http:// or http://www.
And for neatness on the new domain, I would like to add www to any request like http://newdomain.com/whatever to go to http://www.newdomain.com/whatever which I think means that Google analytics will report more accurately.
So would my htaccess file on newdomain.com be like this?:
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^newdomain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
View 3 Replies
View Related
Jun 2, 2007
I am running into a bit of a problem. Previously, I can add an apache handler through cPanel easily... but now I moved to mediatemplate.net and that feature isn't available on their contol panel. Since they also run apache, I figured that I can set the apache handler manually through an .htaccess file - is that possible? If so, what is the syntax that will enable me to set .html files to be handled like .php files?
There is one setback to this process - this will be a manually inserted file for every directory that I want to do the above stated file handler. Is there an easier way to do this via SSH? I don't have root access, only normal user access.
View 3 Replies
View Related