Replies To: using several ../, is it only way to public_html

Re: using several ../, is it only way to public_html

Posted 04 August 2012 - 09:49 PM

Normally you should just be able to refer to it as /, but why would you have them in such a different directory like that? It sounds more like you would want to look into redefining your structure instead of finding a way to monkeypatch some poor design.

Re: using several ../, is it only way to public_html

Posted 04 August 2012 - 10:58 PM

please, can you make your point clearer. yes, i can use /cpanelusername/public_html (am i correct in thinking this is what you refer to?) but i'm developing the site in a folder on my windows os and would like to test it there and just ftp it. so, using / may not cut it for me

Re: using several ../, is it only way to public_html

Posted 04 August 2012 - 11:22 PM

/ refers to the root directory of the web server. It should be directed to Public HTML. You can alias it in Apache's configuration, I was just saying that for the most part if you have to use a lot of directory traversal you're trying to patch something that can be fixed by better design.

Re: using several ../, is it only way to public_html

Posted 10 August 2012 - 10:04 PM

it worked. / resolves to public_html but i had to use a webserver to test it because just opening the web pages from explorer didn't work.

also something weird. i made people.website.com/olibenu point to website.com/people/olibenu and they look different! same text but some css and graphics (with path starting with /) were not loaded.
is / still html for a domain and its subdomain?

Re: using several ../, is it only way to public_html

Posted 21 August 2012 - 04:32 PM

Redirecting to different places may be causing issues with which stylesheet is loaded etc. It may be wiser to store all files in / and just refer to them via the URL (i.e. http://website.com/stylesheet.css).

For testing purposes I recommend you always use a webserver running on your PC as you can run more things than opening it in a browser. You can also take advantage of any Apache functions and you'll have a closer environment to that of your real website - which is much easier to develop with.

Re: using several ../, is it only way to public_html

Posted 21 August 2012 - 08:14 PM

ToshNeox, on 21 August 2012 - 06:32 PM, said:

Redirecting to different places may be causing issues with which stylesheet is loaded etc. It may be wiser to store all files in / and just refer to them via the URL (i.e. http://website.com/stylesheet.css).

For testing purposes I recommend you always use a webserver running on your PC as you can run more things than opening it in a browser. You can also take advantage of any Apache functions and you'll have a closer environment to that of your real website - which is much easier to develop with.

....how is a local server "easier" than an actual server? I guarantee you that any professionally hosted server has more than enough tools and has far more horsepower than much of any home server that a starter can come up with. As far as development, that makes no sense. The server can be halfway across the world, and the only difference in difficulty is negligible at best.

Re: using several ../, is it only way to public_html

Posted 22 August 2012 - 01:59 AM

Lemur, on 21 August 2012 - 08:14 PM, said:

ToshNeox, on 21 August 2012 - 06:32 PM, said:

Redirecting to different places may be causing issues with which stylesheet is loaded etc. It may be wiser to store all files in / and just refer to them via the URL (i.e. http://website.com/stylesheet.css).

For testing purposes I recommend you always use a webserver running on your PC as you can run more things than opening it in a browser. You can also take advantage of any Apache functions and you'll have a closer environment to that of your real website - which is much easier to develop with.

....how is a local server "easier" than an actual server? I guarantee you that any professionally hosted server has more than enough tools and has far more horsepower than much of any home server that a starter can come up with. As far as development, that makes no sense. The server can be halfway across the world, and the only difference in difficulty is negligible at best.

You have to open a browser to view anything on the web.

I'm sorry, but your post makes no coherent sense mate.

I see why you don't get my reply. I was referring to if you were testing specific htaccess files etc. If you just open it in your browser then it will ignore any special apache files as they're only, well, recognizable by apache.

Also if you want to use server side features such as databases, or start using server side languages, a webserver is a 1000% must to be able to view the pages.

I've also found that opening the files in browsers can have issues with layouts too.

For production purposes, you obviously need to upload to your public webserver. But for testing, WAMP/MAMP/XAMPP running on your Windows/Linux/Mac would be adequate. I wasn't trying to say that the webserver will have any more power, nor will it matter as only you can access it, but for testing purposes (and as I said for SS stuff) you will always need it.