Solved

Using PHP/Zend:  path problem in domain and web host

Posted on 2011-09-18
4
479 Views
Last Modified: 2013-12-14
hello all,

on the web host my index.phtml is under:  webhost_home\myproject\public\
and i have a domain with name: www. domainname.com
after i set the dns of my web host in domain server, i can open my project under url:  http://www.domainname.com/myproject/public

the question is:

1: how do i open my project direct under: http://www.domainname.com, should i define the path somewhere.

2: the project is a zend project. if i input url
http://www.domainname.com/ in browser now, i can even see the file content displayed in brower, the url http://www.domainname.com/myproject/ also shows the project file under folder myproject. It should not be happened. So i input a index.phtml under   the web hosting root, and also webhosting_home/myproject and webhosting_home/myproject/application
. but i don't think this is the right way to resolve the problem. any suggestion? btw, the .htaccess is not allowed to put in web host.

following are some information about my domain and web hosting:
 
on the site of web hosting they said that the path of my web hosting is:   /home/vhosts/www.xxx.com
on the site of domain they said the path of  my domain is: /homepages/11/x11/htdocs/.
and Domain ist inclusiv-Domain.

thanks,
wantime

0
Comment
Question by:wantime
  • 2
  • 2
4 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36557840
Web servers are often set up to display a file list when there is no default document like 'index.html'.  Putting 'index.html' is what you Should be doing.  Even if it is blank, it prevents the directory listing.

I don't know about Zend project.
0
 

Author Comment

by:wantime
ID: 36573000
thanks,

maybe i should modify some configuration in web server or php, so that the folder content could be protected. btw, i don't think it is a better way, when i put index.html into every folder to protect the content.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 36575104
Using 'index.html' does not "protect" the files, it just prevents the directory listing.  You didn't ask about protecting the content.

If your host won't allow '.htaccess' files, that is very restrictive.  It would seem unlikely that you can modify the web server configuration if you can't do that.  Maybe you should consider moving to a different host.
0
 

Author Comment

by:wantime
ID: 36579113
ok , i should "prevent" instead of "protect".

 it seems a problem by '.htaccess' file.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question