Welcome Guest, Not a member yet? Register   Sign In
Form actions
#11

[eluser]jwindhorst[/eluser]
Given that scenario, I suppose it could cause some problems, but:
A) I find it suspect to assume that your domain doesn't have it's own document_root at /mydomain/app/
and
B) You should be able to adjust for that by making a change to your config like below:
Code:
if($_SERVER['HTTP_HOST'] == "sharedserver.com")
  $config['base_url'] = "http://sharedserver.com/app/";
else
  $config['base_url'] = "http://dedicatedserver.com/";

Granted, you've made your point and without testing it this is just theory, but I do think something like the above would fix the problem your describing dynamically upon moving the code.
#12

[eluser]baalwww[/eluser]
Agreed (B), that hardcoding the url path will overcome it. But that's where I started the thread, saying that it's unfortunate that that becomes a requirement, that you cannot use relative links because you never know at any given time where they'll be relative to in MVC environment.

As for (A), not suspect at all. For example, I have 20 domains on godaddy. There is one hosting account, with one document root, and all of the domains are subdirectories off that one document root. If you put a leading slash in any reference, it's an issue unless you include the domain's subdirectory name.
#13

[eluser]jwindhorst[/eluser]
[quote author="baalwww" date="1231458471"]Sure, but when you move the project from a domain where the document root = "/" (mydomain.com/" to a domain where the document root is two directories up (public_html/mydomain/applications/) you'd have to go in and edit everything.[/quote]

Well, fixing the hardcoded URL's once I wouldn't describe as "editing everything". It's a one off fix that can mostly then be forgotten about.

I'm sure we could have shortened this whole mini-thread quite a bit if you had told me that you were using Godaddy's hosting Smile. They do a great job with domains (at least the prices are great) but I've found there other services to be a headache at best and a show stopper at worst.

For consistency in my code, I use the "/" at the beginning, but I also manage my own servers so I don't have to worry that my httpd.conf doesn't have proper virtual hosts for any of our subdomains that live on the same server. Which really is what we are talking about I think.
#14

[eluser]baalwww[/eluser]
Yeah, my biggest gripes about them are that I can't use php overrides in .htaccess, can't use more than one php.ini per hosting account, and can't access the logs.

The reason I stay is that I can have up to 25 db's on one account (important when doing web design and each project has a db), php4 AND php5, mysql4 AND mysql5.




Theme © iAndrew 2016 - Forum software by © MyBB