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
Solved

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

Posted on 2011-09-18
4
482 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

808 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