Htaccess (Wordpress): Difference between revisions

From P&T Knowledgebase
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
  # BEGIN WordPress
  # BEGIN WordPress
  <IfModule mod_rewrite.c>
  <IfModule mod_rewrite.c>
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