मैं यह करना चाहता हूं
website.com/blog/index.php - & gt; Website.com/blog
website.com/admin/archief_login.php - & gt; Website.com/admin
यह मेरे कोड के साथ काम करता है लेकिन मैं इसे जोड़ना चाहता हूं:
website.com/aa - & gt; Website.com/web/index.php?init=aa
किसी कारण से ब्लॉग को ये रीडायरेक्ट मिलता है: website.com/blog/?init=blog
सबसे अच्छा क्या है इन विभिन्न पुनर्लेखन स्थापित करने के लिए जिस तरह से?
RewriteEngine पर विकल्प सभी -Indexes RewriteCond% {HTTP_HOST} websit.com $ [या] RewriteCond% {HTTP_HOST} www.website.com $ RewriteRule ^ व्यवस्थापक $ "http \: \ / \ / www.website.com \ /admin/archief_login.php" [आर = 301, एल]
RewriteRule ^ ब्लॉग $ "http \: \ / \ / www .website.com \ /blog/index.php "[आर = 301, एल]
DirectoryIndex client_login.php
RewriteRule ^ स्क्रीन - ([a-zA-Z0-9_ -।?।?] +) html $ index_client.php स्क्रीन = $ 1
RewriteRule ^ चालान ([एक-zA-Z0-9 _-]) html $ make_invoice.php आईडी = $ 1
RewriteRule ^ पैक - ([एक-zA-Z0-9 _-]) html $ index_client.php स्क्रीन = pack_code & amp; wwwcode = $ 1
।?
आपको फ़ाइल में "सामान्य" नियमों को कम रखने की जरूरत है ताकि वे अपने सभी यूआरएल
पुनर्लेखन नियम ^ (\ w) $ /web/index.php?init=$1 [एल, एन सी] RewriteRule ^ ब्लॉग $ /blog/index.php [आर = 301, एल]
इसके बाद के संस्करण क्या करेंगे
website.com / एए = & gt; Website.com/web/index.php?init=aa website.com/blog = & gt; Website.com/web/index.php?init=blog
यदि आप दो नियमों को उल्टा करते हैं तो आपको
website.com/aa = & gt मिल जाएगा। ; Website.com/web/index.php?init=aa website.com/blog = & gt; Website.com/blog/index.php
Comments
Post a Comment