/ / Htaccess नियमों को परिवर्तित मार्गों को अनुक्रमणिका में बदलें।

Index.php से nginx - apache, .htaccess, nginx में htaccess नियमों को रूट करने के पथ को कनवर्ट करें

मैं nginx के लिए नया हूँ, लेकिन मैं बदलने की कोशिश कर रहा हूँ

# Disallows file browsing
Options -Indexes
# Custom Error Pages
ErrorDocument 403 /error-docs/403.php
ErrorDocument 404 /error-docs/404.php
ErrorDocument 500 /error-docs/500.php
# Turn on the Apache Rewrite Engine
RewriteEngine On
#Conditional to see if it is a real file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# If not then pass the query string to index.php and stop any further rules
RewriteRule (.*) index.php/$1 [PT,L]

nginx सिंटैक्स के लिए। मैं सुझाव पर कोशिश की है Nginx के साथ index.php के माध्यम से रूटिंग अनुरोध लेकिन यह "मुझे वह करने की आवश्यकता है जो मैं नहीं करता हूं। मैंने" ऑटो कन्वर्टर्स की कोशिश की http://winginx.com/en/htaccess तथा http://www.anilcetin.com/ लेकिन जो नियम वे मेरे लिए काम करते हैं, वे किसी भी मदद के लिए नहीं हैं।

उत्तर:

जवाब के लिए 0 № 1

मेरे पास जो समस्या थी वह वास्तव में मेरे PHP और MySQL कोड से संबंधित थी।

location / {
try_files $uri $uri/ /index.php$args;
}

ठीक काम करता है। लिंक के लिए धन्यवाद।