2011-12-21 12 views
13

मैं वर्तमान में अपने होस्टिंग खाते पर किसी ग्राहक से वेबसाइट स्थापित कर रहा हूं। वेबसाइट का पता और किसी कारण से .php फ़ाइलों के लिए डिफ़ॉल्ट नहीं है (यानी: index.php)। अगर मैं index.php रख दिया और कोई index.html फ़ाइल मैं निम्न त्रुटि प्राप्त होती है:htaccess के माध्यम से डिफ़ॉल्ट वेबसाइट पेज कैसे सेट करें?

If you feel you have reached this page in error, please contact the web site owner: [email protected] If you are the web site owner, it is possible you have reached this page because: The IP address has changed. There has been a server misconfiguration. The site may have been moved to a different server. If you are the owner of this website and were not expecting to see this page, please contact your hosting provider.

उनकी होस्टिंग एक cpanel पर होस्टिंग साझा किया जाता है।

उत्तर

24

अपनी .htacces फ़ाइल में DirectoryIndex निर्देश का प्रयोग करें

DirectoryIndex index.php 
2

DirectoryIndex index.php 

प्रयास करें कि अगर

तरह index.html प्रदान करके काम नहीं करता है तो आप इसे हल करने के लिए हो सकता है
<html><frameset rows="*"><frame src="index.php"></frameset></html> 

(अधिक विस्तृत करें)

+0

यदि आप पहले से ही इस तरह के समाधान का सुझाव देते हैं, तो फ्रेम उपयोग बिल्कुल बेकार है: बस संबंधित ' 'टैग के साथ रीडायरेक्ट सेट करें। –

3

समस्या मेरे वेब ब्राउज़र कैश के कारण हुई, जैसे ही मैंने अपना कैश साफ़ कर दिया, यह काम किया!