Saturday, March 19, 2011

Re: [Pro. PHP Dev.] .htaccess

I don't think you're going to get this to work the way you want it to. Your DNS entries aren't going to take paths, they will take IPs. You might be able to get away with a subdomain of the one that you set up to push requests off to the other, but that will be more involved.

Basically what you are looking to do is send all requests for either domain to the same IP and handle the request at that IP. Nothing new here... we servers do this by their very nature. The challenge you have is that you have no access to your web server's config so you can't create any virtual hosts. I don't think a .htaccess file will do this since, by the nature of these files, the request would have already had to have been routed in order for the .htaccess file to be read.

Does that make sense?

On Sat, Mar 19, 2011 at 2:22 AM, Ovidiu Alexa <ovidiu.alexa@gmail.com> wrote:
Hi,

thanks for your suggestion. I'm limited with only the "Simple DNS Zone Editor " in Cpanel. This is a public server and I don't have access to WHM. I'll put up a screen shot. Are you saying that I should delete the www.worldwidetravel.ro. CNAME worldwidetravel.ro record and make a new one like this: www.worldwidetravel.ro. CNAME /worldwidetravel/ ?


Thanks.


On Sat, Mar 19, 2011 at 2:13 AM, Cesar Ramos <cesarramose@gmail.com> wrote:
you have to manage the dns of the domain so you can point it to the folder

On Fri, Mar 18, 2011 at 7:10 PM, Ovidiu <ovidiu.alexa@gmail.com> wrote:
Hello,

it seems to me that google has failed me for the first time. I have
purchased 2 domains and I would like to have 2 sites for one hosting
service :) it's cheaper:

so my target is to have the fisrt domain (lets call it site1) read
the /
and site2 should read the /site2/ contents. I know that in Cpanel you
can include addon domains, but like I said, it's another hosting
service for more bucks.


so far not even the server administrator has a good ideea for this
problem, even though it's not a service I should pay for he wanted to
help me.

before this I used an old trick with php like $_SERVER['HTTP_HOST']
and if the host is site2 then include site2/index.php

well, I found this not to be enough because all the files should be
accessed from that particular directory.

so why not .htaccess?

I have found on the web that you can permanently redirect a non-www
domain to the same domain but with the www. added. which goes a little
like this:


RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]


I can't seem to get around this idea that there must be a way to have
that parked domain behave like a stand-alone domain but within the
same hosting package.

I am asking anyone that can help me on this one, if there's a way.

So far, with this kind of rewrite rule I have a redirect loop. I'm
stuck.

Please help me. I don't want to pay those bastards for something that
should be free because my hosting package is not the cheapest from
their list.

I mean why do I get 2 extra parked domains, 2 data bases and 1 GB of
space but no addon domains?

Thanks in advance.




--
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHP@googlegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP

--
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.
 
For information or project assistance please visit :
http://www.360psg.com
 
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHP@googlegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP

--
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.
 
For information or project assistance please visit :
http://www.360psg.com
 
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHP@googlegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP

--
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.
 
For information or project assistance please visit :
http://www.360psg.com
 
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHP@googlegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP