Solved

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

Posted on 2011-09-18
4
485 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
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 …
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

696 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