Difference between revisions of "Htaccess (Wordpress)"

From P&T Knowledgebase
Jump to navigation Jump to search
 
Line 5: Line 5:
 
  RewriteEngine On
 
  RewriteEngine On
 
  RewriteRule ^index\.php$ - [L]
 
  RewriteRule ^index\.php$ - [L]
 +
RewriteCond %{REQUEST_URI} !/wp-content/
 
  RewriteCond %{REQUEST_FILENAME} !-f
 
  RewriteCond %{REQUEST_FILENAME} !-f
 
  RewriteCond %{REQUEST_FILENAME} !-d
 
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . index.php [L]
+
  RewriteRule . /index.php [L]
 
  </IfModule>
 
  </IfModule>
 
  # END WordPress
 
  # END WordPress

Latest revision as of 02:47, 2 August 2015

ต้องสร้างไฟล์ .htaccess ไว้ในโฟลเดอร์หลักของ wordpress เวลาที่เปิดใช้ Permalink.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !/wp-content/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress