Seperate www url from http url to use both urls with different script
Hello there,
I would like to install a multiuser Wordpress in the http:// part of the Domain and another script (Link Directory) in the www part.
Using www indeed as an own Subdomain. So that I can use shows my directory.
I would LOVE to see a redirect of some kind from only the if that would be possible.
Is there any chance that I can have this somehow working in cPanel.. any ideas?
Kind regards
-
I just had a 'working' solution as it seemed. [PHP]# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress RewriteCond %{HTTP_HOST} ^www\.domain\.tld$ RewriteCond %{REQUEST_URI} !^/www/ RewriteRule (.*) /www/$1[/PHP] Wordpress worked and the domain also showed the content of the folder www ... but sadly the linkdirectory didn't worked that way it seemed. So i am still looking for a solution that would allow me to use www really like a subdomain. 0 -
I had the urge to dig a bit more and I had found that there was a possible solution where the subdomain configs are stored and I had tried my luck in creating a testsubdomain to see whats the content of these files, to modify it to create a subdomain www... Using WinSCP and going to /var/cpanel/userdata/username Every file was modified to add the www subdomain and the domain.tld/domain.tld.cache was modified that the serveralias was changed from www.domain.tld to domain.tld .... After a apache restart, I had indeed a www subdomain in my cpanel that could be edited. But as the Skript was still not working, I removed everything and created two index files with the one line "www" and "non-www" to see that my changed worked. Sadly they didn't ... So I somehow miss the place where I can change this last bit in the puzzle I believe. Any ideas where I might be able to find this option to set things the right way? 0 -
Wow, dound a new lead that while checking a bit and I came across the httpd.conf .... Downloaded it and found this: ServerName domain.tld ServerAlias www.domain.tld DocumentRoot /home/USERNAME/public_html ServerAdmin webmaster@domain.tld UseCanonicalName Off CustomLog /usr/local/apache/domlogs/domain.tld combined CustomLog /usr/local/apache/domlogs/domain.tld-bytes_log "%{%s}t %I .\n%{%s}t %O ." ## User USERNAME # Needed for Cpanel::ApacheConf UserDir enabled USERNAME suPHP_UserGroup USERNAME USERNAME php_admin_value open_basedir "/home/USERNAME:/usr/lib/php:/usr/local/lib/php:/tmp" php_admin_value open_basedir "/home/USERNAME:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp" SuexecUserGroup USERNAME USERNAME RMode config RUidGid USERNAME USERNAME # For more information on MPM ITK, please read: # http://mpm-itk.sesse.net/ AssignUserID USERNAME USERNAME ScriptAlias /cgi-bin/ /home/USERNAME/public_html/cgi-bin/ # To customize this VirtualHost use an include file at the following location # Include "/usr/local/apache/conf/userdata/std/2_2/USERNAME/domain.tld/*.conf"
right below this entry I find (I guess) my strangely created subdomain:ServerName www.domain.tld ServerAlias www.www.domain.tld DocumentRoot /home/USERNAME/public_html/www ServerAdmin webmaster@www.domain.tld UseCanonicalName Off CustomLog /usr/local/apache/domlogs/www.domain.tld combined CustomLog /usr/local/apache/domlogs/www.domain.tld-bytes_log "%{%s}t %I .\n%{%s}t %O ." ## User USERNAME # Needed for Cpanel::ApacheConf UserDir enabled USERNAME suPHP_UserGroup USERNAME USERNAME php_admin_value open_basedir "/home/USERNAME:/usr/lib/php:/usr/local/lib/php:/tmp" php_admin_value open_basedir "/home/USERNAME:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp" SuexecUserGroup USERNAME USERNAME RMode config RUidGid USERNAME USERNAME # For more information on MPM ITK, please read: # http://mpm-itk.sesse.net/ AssignUserID USERNAME USERNAME ScriptAlias /cgi-bin/ /home/USERNAME/public_html/www/cgi-bin/ # To customize this VirtualHost use an include file at the following location # Include "/usr/local/apache/conf/userdata/std/2_2/USERNAME/www.domain.tld/*.conf"
Besides that here is the server alias www.www.domain.tld it looks fine. The Problem is, when i check the named folder where I should change the stuff: "/usr/local/apache/conf/userdata/std/2_2/USERNAME/domain.tld/*.conf" I end at /usr/local/apache/conf/userdata/std/2_2/ and there is just one other user, not the one I need. I could find that I have to create the folders and a *.conf file myself ... so update.conf it would be... but HOW to enter there now my needed updates? Somehow for a newbie there is not really something to be found that one can understand... As I had edited all files inside /var/cpanel/userdata/username and used these comands to rebuild httpd.confcp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak101021 /scripts/rebuildhttpdconf /etc/init.d/httpd restart
i thought i should be good to go, but still I have connected... So this whole thing is very frustrating, as it seemed to be something very easy after I had found these config files... but where does it get stuck?0 -
Problem solved. I did the right thing, but I had messed up a while ago when I made my first tryouts. I expect that somewhere in the beginning I had messed with the DNS Settings (Edit DNS Zone) .... because when I terminated the Account and recreated it again, uploaded the modified files domain.tld.cache domain.tld cache main main.cache www.domain.tld.cache www.domain.tld via SCP and didn't do anything else (because i was searching for solutions) So when i had opened the 0 -
Right now I have uploaded Wordpress and PhpLD ... just need to be installed and the main site of wordpress install gets a php redirect ... i think i'll got everything i was looking for!
Hello :) I am happy to see it's working well. Thank you for updating us with the outcome.0 -
Well, something is strange... but maybe you guys can help me out. I have changed my server, doing what I have done before is still possible, but it has simply no effect. So i tried to remove the www subdomain in cPanel and found a message, that lead me here to this old topic: extra www subdomain - and cannot remove! Is there a way to savely get EXACTLY that? I WANT the extra folder.. but for some reason I can't get it anymore on the new server and I absolutely don't see the problem here. Everything in /var/cpanel/userdata/username looks exactly the way it was before. I went that far and simply took the files from the working server, changed Username and IP adress and uploaded it again. Rebuild apache and..... nothing .... Did I miss something? did I do something that I did before? I cannot tell. I only know that the things I have done what I described here worked the last time, but this time not. But having this Topic about REMOVING what I want... maybe someone can get me the information I am so longing for... 0 -
Did I miss something? did I do something that I did before? I cannot tell. I only know that the things I have done what I described here worked the last time, but this time not.
Could you let us know the specific steps you have taken thus far? Thank you.0
Please sign in to leave a comment.
Comments
7 comments