+1
Additionnaly, यदि आप एक .htaccess फ़ाइल का उपयोग कर रहे हैं जैसे सीआई दस्तावेज़ पर सुझाए गए, तो इसे सीधे वेब रूट डीआईआर में डब्ल्यूपी निर्देशिका छोड़कर काम करना चाहिए।
RewriteEngine On
RewriteBase/
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#This last condition enables access to the images and css folders, and the robots.txt file
#Submitted by Michael Radlmaier (mradlmaier)
RewriteCond $1 !^(index\.php|robots\.txt|corporate|assets)
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
और
RewriteCond %{REQUEST_FILENAME} !-d
किसी भी वेबसर्वर पर कोई वास्तविक फाइल करने के लिए सीधे कॉल सीधे अपाचे द्वारा कार्य किया जाएगा की वजह से
, अन्य यूआरआई सीआई के मार्ग mecanism द्वारा नियंत्रित किया जा wil।
नोटिस हमने अपनी संपत्ति डीआईआर (छवियों/सीएसएस/जेएस स्थिर फाइलें) और 'कॉरपोरेट' डायर समेत फाइलों को प्रमाणित करने के लिए अंतिम RewriteCond
निर्देश का उपयोग किया, जिसमें इस मामले में एक ब्लॉग शामिल है।
हालांकि यह उदाहरण वर्डप्रेस का उपयोग नहीं करता है, इसकी अपनी यूआरएल-रीराइटिंग और रूटिंग सिस्टम है।
निष्कर्ष के मामले में, यदि आप WP url-rewriting का उपयोग करना चाहते हैं, तो आप एक विशिष्ट RewriteCond
कथन का उपयोग करेंगे, अगर यह इसके बिना काम नहीं कर सकता है।
धन्यवाद। इसके देखो से, यह काम करना चाहिए। मैं यह कोशिश कर रहा हूँ। – masnun
इस तरह हम सीआई को अन्य ऐप्स/साइटों के साथ एकीकृत करते हैं। इसे दोनों तरीकों से काम करने से मना कर दिया जा सकता है: सीआई ऐप वर्डप्रेस डायर में, और सीआई ऐप डीआईआर के अंदर वर्डप्रेस। – Benoit
@ रिच मिलर यह मेरे लिए काम नहीं कर रहा है। क्या आप सवाल देख सकते हैं http://stackoverflow.com/questions/32534801/installing-codeigniter-on-root-and-wordpress-in-sub-directory-not-working –