Solved

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

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.

929 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now