Solved

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

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

Expert Comment

by:Dave Baldwin
Comment Utility
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
Comment Utility
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 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
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
Comment Utility
ok , i should "prevent" instead of "protect".

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Migrating DHCP network settings from vlans 2 46
Menu Inconsistent 3 18
Homegroup issues 6 34
Linux as a middle box 7 9
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

771 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

10 Experts available now in Live!

Get 1:1 Help Now