apache - Redirect domain.com/folder to folder.domain.com permanently -


संभावित डुप्लिकेट

मैंने सभी नियमों को व्यवस्थित किया है और एक सबडोमेन ठीक काम कर रहा है।

हालांकि मेरी साइट के एक हिस्से के बजाय अभी भी संभव है

मैं कैसे स्थायी रीडायरेक्ट?

मुझे लगता है कि ऐसा कुछ है:

  पुनर्लेखन% {HTTP_HOST} ^ उदाहरण <.com $ [NC] # (नियम यह देखने के लिए कि क्या मैं हूँ उपडोमेन फ़ोल्डर के अंदर) रीवाइट्राइल ^ (। *) $ Http://www.subdomain.example.com/$1 [R = 301, L]  

आप इस पंक्ति को अपने मुख्य .htaccess में एक साधारण फ़ोल्डर 301 "मूवर्ड / स्थायी" रीडायरेक्ट के लिए इस्तेमाल करेंगे

  301 / subdomain redirect : //subdomain.example.com  


Comments

Popular posts from this blog

c# - PInvoke of NetUserAdd returns 24 -

c# - XMLDocument.Validate Error: System.InvalidOperationException : The XmlSchemaSet on the document is either null or has no schemas in it -