<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>รวมวิธีการใช้ Wordpress, Joomla, Drupal, Magento และ SEO &#187; .htaccess</title> <atom:link href="http://killthewhat.com/tag/htaccess/feed/" rel="self" type="application/rss+xml" /><link>http://killthewhat.com</link> <description>Knowledge Base by howhost.com</description> <lastBuildDate>Fri, 24 Dec 2010 15:00:17 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.3</generator> <item><title>ป้องกันการเข้าถึงหน้า wp-admin ใน wordpress</title><link>http://killthewhat.com/wordpress-tutorials/%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b9%89%e0%b8%b2%e0%b8%96%e0%b8%b6%e0%b8%87%e0%b8%ab%e0%b8%99%e0%b9%89%e0%b8%b2-wp-admin/</link> <comments>http://killthewhat.com/wordpress-tutorials/%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b9%89%e0%b8%b2%e0%b8%96%e0%b8%b6%e0%b8%87%e0%b8%ab%e0%b8%99%e0%b9%89%e0%b8%b2-wp-admin/#comments</comments> <pubDate>Mon, 15 Mar 2010 14:46:29 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Wordpress]]></category> <category><![CDATA[.htaccess]]></category> <category><![CDATA[wp-admin]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=5608</guid> <description><![CDATA[ในการเข้าถึงหน้า admin ของ wordpress นั้นโดยปกติเราก็จะเข้าด้วย www.domain.com/wp-admin ซึ่งถ้าพูดถึงในเรื่องระดับความปลอดภัยแล้วน้อยมากครับ เพราะเมื่อเข้าไปก็จะพบกับหน้า login ของระบบทำให้เหล่า hacker สามารถเดาหรือยิง script เข้ามาเพื่อทำการสุ่มรหัสผ่านได้ ฉะนั้นเรามาป้องกันไม่ให้เข้าหน้านี้ได้จะดีกว่าครับ ในทริคนี้ผมคงแนะนำให้ใช้เฉพาะเว็บที่ไม่ได้เปิดระบบสมาชิก เพราะเราจะปิดการเข้าถึงหน้า wp-admin เลยครับและเปิดให้เข้าได้เฉพาะ IP address ที่เราจะให้เข้าครับ โดยให้เราสร้างไฟล์ .htaccess ขึ้นมาจากนั้นใส่โค็ดด้านล่างลงไป AuthUserFile /dev/null AuthGroupFile /dev/null AuthName &#34;Example Access Control&#34; AuthType Basic &#60;LIMIT GET&#62; order deny,allow deny from all allow from xxx.xxx.xxx.xxx allow from xxx.xxx.xxx.xxx ... allow from xxx.xxx.xxx.xxx &#60;/LIMIT&#62; xxx.xxx.xxx.xx ให้เราใส่เป็น [...]]]></description> <content:encoded><![CDATA[<p>ในการเข้าถึงหน้า admin ของ wordpress นั้นโดยปกติเราก็จะเข้าด้วย www.domain.com/wp-admin ซึ่งถ้าพูดถึงในเรื่องระดับความปลอดภัยแล้วน้อยมากครับ <span
id="more-5608"></span> เพราะเมื่อเข้าไปก็จะพบกับหน้า login ของระบบทำให้เหล่า hacker สามารถเดาหรือยิง script เข้ามาเพื่อทำการสุ่มรหัสผ่านได้ ฉะนั้นเรามาป้องกันไม่ให้เข้าหน้านี้ได้จะดีกว่าครับ</p><p>ในทริคนี้ผมคงแนะนำให้ใช้เฉพาะเว็บที่ไม่ได้เปิดระบบสมาชิก เพราะเราจะปิดการเข้าถึงหน้า wp-admin เลยครับและเปิดให้เข้าได้เฉพาะ IP address ที่เราจะให้เข้าครับ โดยให้เราสร้างไฟล์ .htaccess ขึ้นมาจากนั้นใส่โค็ดด้านล่างลงไป</p><pre class="brush: php; title: ;">
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName &quot;Example Access Control&quot;
AuthType Basic
&lt;LIMIT GET&gt;
order deny,allow
deny from all
allow from xxx.xxx.xxx.xxx
allow from xxx.xxx.xxx.xxx
...
allow from xxx.xxx.xxx.xxx
&lt;/LIMIT&gt;
</pre><p>xxx.xxx.xxx.xx ให้เราใส่เป็น ip ครับถ้าจะเพิ่มให้ ip ไหนเข้าได้ก็เพิ่มได้เรื่อยๆครับจากนั้นบันทึกไว้ในโฟลเดอร์ wp-admin/</p><p>ข้อควรระวัง อย่านำไฟล์นี้ไปใส่ไว้ที่ root directory ของ wordpress นะครับไม่งั้นคนอื่นจะเข้าเว็บไม่ได้</p><p>thank : http://www.reubenyau.com/protecting-the-wordpress-wp-admin-folder/</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/wordpress-tutorials/%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b9%89%e0%b8%b2%e0%b8%96%e0%b8%b6%e0%b8%87%e0%b8%ab%e0%b8%99%e0%b9%89%e0%b8%b2-wp-admin/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ทำ mod rewrite (.htaccess) ใน prestashop</title><link>http://killthewhat.com/prestashop-tutorials/%e0%b8%97%e0%b8%b3-mod-rewrite-htaccess-%e0%b9%83%e0%b8%99-prestashop/</link> <comments>http://killthewhat.com/prestashop-tutorials/%e0%b8%97%e0%b8%b3-mod-rewrite-htaccess-%e0%b9%83%e0%b8%99-prestashop/#comments</comments> <pubDate>Wed, 07 Oct 2009 18:25:18 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[PrestaShop]]></category> <category><![CDATA[.htaccess]]></category> <category><![CDATA[friendly url]]></category> <category><![CDATA[mod_rewrite]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=4775</guid> <description><![CDATA[หลายๆคนก็คนจะรู้จัก mod rewrite หรือ Friendly URL กันมาแล้วนะครับ อธิบายง่ายๆสั้นๆก็คือทำให้ url ของเว็บเราดูแล้วอ่านง่าย ง่ายต่อเราและง่ายต่อ bot ของ search engine ซึ่งถ้าใครจะเล่น SEO ด้วยแล้วนะก็คงพลาดที่จะทำในส่วนนี้แน่นอครับ วิธีทำ Friendly URL ใน prestashop ก็ไม่ยากครับ 1. ให้สร้างไฟล์ .htaccess ขึ้นมาแล้วนำไปวางไว้ที่เว็บของเรา จากนั้นปรับ permission ให้เป็น 777 2. เข้าหน้า admin ของ prestashop ไปที่เมนู Preferences จากนั้นเลื่อนลงมาดูในส่วนของ Friendly URL ให้ติ้กช่อง ใช่ จากนั้นกดสร้างไฟล์ .htaccess 3. ต่อมาให้เรากด สร้างไฟล์ .htaccess ครับ ให้เราสังเกตุที่ไฟล์ .htaccess ของเราจะต้องมีข้อมูลอยู่ในนั้นด้วยน่ะครับหลังจากทำทั้ง 3 [...]]]></description> <content:encoded><![CDATA[<p>หลายๆคนก็คนจะรู้จัก <strong>mod rewrite</strong> หรือ <strong>Friendly URL</strong> กันมาแล้วนะครับ อธิบายง่ายๆสั้นๆก็คือทำให้ url ของเว็บเราดูแล้วอ่านง่าย ง่ายต่อเราและง่ายต่อ bot ของ search engine<span
id="more-4775"></span> ซึ่งถ้าใครจะเล่น SEO ด้วยแล้วนะก็คงพลาดที่จะทำในส่วนนี้แน่นอครับ</p><p>วิธีทำ <strong>Friendly URL</strong> ใน prestashop ก็ไม่ยากครับ<br
/> 1. ให้สร้างไฟล์ .htaccess ขึ้นมาแล้วนำไปวางไว้ที่เว็บของเรา จากนั้นปรับ permission ให้เป็น 777<br
/> 2. เข้าหน้า admin ของ prestashop ไปที่เมนู Preferences จากนั้นเลื่อนลงมาดูในส่วนของ Friendly URL ให้ติ้กช่อง ใช่ จากนั้นกดสร้างไฟล์ .htaccess<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2009/10/prestashop27.png" alt="prestashop" title="prestashop" width="407" height="155" class="aligncenter size-full wp-image-4776" /></p><p>3. ต่อมาให้เรากด สร้างไฟล์ .htaccess ครับ<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2009/10/prestashop28.png" alt="prestashop" title="prestashop" width="548" height="322" class="aligncenter size-full wp-image-4777" /></p><p>ให้เราสังเกตุที่ไฟล์ .htaccess ของเราจะต้องมีข้อมูลอยู่ในนั้นด้วยน่ะครับหลังจากทำทั้ง 3 ขั้นตอนเสร็จแล้ว</p><pre class="brush: php; title: ;">
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/p/$1-$2$3.jpg [L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/c/$1$2.jpg [L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$3&amp;isolang=$1$5 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2&amp;isolang=$1$4 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$2&amp;isolang=$1 [QSA,L,E]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /prestashop/supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /prestashop/manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/(.*)$ /prestashop/$2?isolang=$1 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /prestashop/404.php
</pre><p>ของแต่ละคนจะไม่เหมือนกันนะ อย่าคัดลอกของผมไปใช้ซะล่ะเพียงแค่นี้ url ของเว็บขายของเราก็จะสวยงามละครับ</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/prestashop-tutorials/%e0%b8%97%e0%b8%b3-mod-rewrite-htaccess-%e0%b9%83%e0%b8%99-prestashop/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>การทำ Mod_rewrite ของ magento (.htaccess)</title><link>http://killthewhat.com/magento-tutorials/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-mod_rewrite-%e0%b8%82%e0%b8%ad%e0%b8%87-magento-htaccess/</link> <comments>http://killthewhat.com/magento-tutorials/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-mod_rewrite-%e0%b8%82%e0%b8%ad%e0%b8%87-magento-htaccess/#comments</comments> <pubDate>Thu, 17 Sep 2009 17:05:56 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Magento]]></category> <category><![CDATA[.htaccess]]></category> <category><![CDATA[mod_rewrite]]></category> <category><![CDATA[seo]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=4495</guid> <description><![CDATA[การทำ mod_rewrite ของ magento โดยผ่านไฟล์ .htaccess นั้นไม่ยากเลยครับ ผลที่ได้ก็คือเวลาเรียก url ปกติจะไม่มี index.php ตามหลัง เช่น ปกติถ้ากดไปที่ไหนก็ตามในเว็บ magento เรา url จะออกมาแบบนี้ http://shop.snappytux.com/index.php/mainboard/socket-1366.html เมื่อทำ mod_rewrite แล้วก็จะเป็นแบบนี้ http://shop.snappytux.com/mainboard/socket-1366.html ซึ่งจะสังเกตุเห็นว่า index.php หายไปทำให้ url ที่เรียกเว็บไซต์เราสวยงามกว่าเดิมและยังมีประโยชน์ในการทำ SEO ด้วยน่ะครับพี่น้อง ให้เราทำการแก้ไขไฟล์ .htaccess ของ magento โดยทำการแก้ไขหรือเพิ่มเติม code ด้านล่างเข้าไปในไฟล์ php_flag magic_quotes_gpc off php_flag short_open_tag on DirectoryIndex index.php RewriteEngine on #RewriteBase / /* ในบรรทัดนี้ถ้าใครลง magento เป็น sub directory [...]]]></description> <content:encoded><![CDATA[<p>การทำ <strong>mod_rewrite </strong> ของ magento โดยผ่านไฟล์ <strong>.htaccess</strong> นั้นไม่ยากเลยครับ ผลที่ได้ก็คือเวลาเรียก url ปกติจะไม่มี index.php ตามหลัง เช่น ปกติถ้ากดไปที่ไหนก็ตามในเว็บ magento เรา<span
id="more-4495"></span> url จะออกมาแบบนี้ http://shop.snappytux.com/index.php/mainboard/socket-1366.html เมื่อทำ mod_rewrite แล้วก็จะเป็นแบบนี้ http://shop.snappytux.com/mainboard/socket-1366.html ซึ่งจะสังเกตุเห็นว่า index.php หายไปทำให้ url ที่เรียกเว็บไซต์เราสวยงามกว่าเดิมและยังมีประโยชน์ในการทำ <strong>SEO</strong> ด้วยน่ะครับพี่น้อง</p><p>ให้เราทำการแก้ไขไฟล์ .htaccess ของ magento โดยทำการแก้ไขหรือเพิ่มเติม code ด้านล่างเข้าไปในไฟล์</p><pre class="brush: php; title: ;">
php_flag magic_quotes_gpc off
php_flag short_open_tag on

DirectoryIndex index.php

RewriteEngine on

#RewriteBase /   /* ในบรรทัดนี้ถ้าใครลง magento เป็น sub directory ก็ให้เปลี่ยนตามนะครับในที่นี้จะหมายถึงลงไว้ที่ root directory */

RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php
</pre><p>หรือถ้าไม่อยากยุ่งยากเอาของผมที่ใช้อยู่ไปเลยก็ได้ครับ ถ้าเอาจากด้านล่างนี้ไปก็ลบของเก่าออก แล้วเอาตัวนี้ทับไปเลย</p><pre class="brush: php; title: ;">
############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi

   # Action php5-cgi /cgi-bin/php5-cgi
    # AddHandler php5-cgi .php

############################################
## GoDaddy specific options

#   Options -MultiViews

## you might also need to add this line to php.ini
##     cgi.fix_pathinfo = 1
## if it still doesn't work, rename php.ini to php5.ini

############################################
## this line is specific for 1and1 hosting

    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php

############################################
## default index file

    DirectoryIndex index.php

&lt;IfModule mod_php5.c&gt;

############################################
## adjust memory limit

    php_value memory_limit 64M
    php_value max_execution_time 18000

############################################
## disable magic quotes for php request vars

    php_flag magic_quotes_gpc off
    php_flag short_open_tag on

############################################
## disable automatic session start
## before autoload was initialized

    php_flag session.auto_start off

############################################
## enable resulting html compression

    #php_flag zlib.output_compression on

###########################################
# disable user agent verification to not break multiple image upload

    php_flag suhosin.session.cryptua off

###########################################
# turn off compatibility with PHP4 when dealing with objects

    php_flag zend.ze1_compatibility_mode Off

&lt;/IfModule&gt;

&lt;IfModule mod_security.c&gt;
###########################################
# disable POST processing to not break multiple image upload

    SecFilterEngine Off
    SecFilterScanPOST Off
&lt;/IfModule&gt;

&lt;IfModule mod_deflate.c&gt;

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

    # Insert filter on all content
    ###SetOutputFilter DEFLATE
    # Insert filter on selected content types only
    #AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript

    # Netscape 4.x has some problems...
    #BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    #BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    # Don't compress images
    #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    #Header append Vary User-Agent env=!dont-vary

&lt;/IfModule&gt;

&lt;IfModule mod_ssl.c&gt;

############################################
## make HTTPS env vars available for CGI mode

    SSLOptions StdEnvVars

&lt;/IfModule&gt;

&lt;IfModule mod_rewrite.c&gt;

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    #RewriteBase /

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
    RewriteCond %{REQUEST_URI} !^/media/
    RewriteCond %{REQUEST_URI} !^/skin/
    RewriteCond %{REQUEST_URI} !^/js/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule .* index.php

&lt;/IfModule&gt;

############################################
## Prevent character encoding issues from server overrides
## If you still have problems, use the second line instead

    AddDefaultCharset Off
    #AddDefaultCharset UTF-8

&lt;IfModule mod_expires.c&gt;

############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires

    ExpiresDefault &quot;access plus 1 year&quot;

&lt;/IfModule&gt;

############################################
## By default allow all access

    Order allow,deny
    Allow from all

############################################
## If running in cluster environment, uncomment this
## http://developer.yahoo.com/performance/rules.html#etags

    #FileETag none
</pre><p>หลังจากนั้นเข้าหน้า admin ไปที่เมนู System >> Configuration แท็บด้านซ้ายเลือก Web ครับ ตรง Search Engines Optimization ให้เลือกเป็น Yes ดังรูป<br
/> <a
href="http://killthewhat.com/wp-content/uploads/2009/09/magento9.png" rel="lightbox[4495]"><img
src="http://killthewhat.com/wp-content/uploads/2009/09/magento9.png" alt="magento" title="magento" width="630" height="195" class="aligncenter size-full wp-image-4499" /></a></p><p>เป็นอันเสร็จสิ้นเท่านี้ url เราก็สวยงามผ่าน SEO แล้ว</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/magento-tutorials/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-mod_rewrite-%e0%b8%82%e0%b8%ad%e0%b8%87-magento-htaccess/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>วิธีทำ clean url บน drupal 6</title><link>http://killthewhat.com/drupal-tutorials/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%97%e0%b8%b3-clean-url-%e0%b8%9a%e0%b8%99-drupal-6/</link> <comments>http://killthewhat.com/drupal-tutorials/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%97%e0%b8%b3-clean-url-%e0%b8%9a%e0%b8%99-drupal-6/#comments</comments> <pubDate>Sat, 18 Jul 2009 17:23:31 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[.htaccess]]></category> <category><![CDATA[clean url]]></category> <category><![CDATA[rewrite]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=3614</guid> <description><![CDATA[clean url ของ drupal มีประโยชน์ก็เพื่อทำให้ url นั่นอ่านง่ายขึ้นจากปกติจะมี ? อยู่ใน url เช่น https://killthewhat.com/drupal/?q=admin/settings/clean-urls เมื่อใช้ Clean URL ก็จะเป็น https://killthewhat.com/drupal/admin/settings/clean-urls โดยเมื่อตอนติดตั้ง drupal ครั้งที่แล้วผมได้ติดในเรื่องนี้ไว้ดังภาพ ซึ่งวิธีแก้ไขก็ไม่ยากครับให้เราเข้าไปแก้ไขไฟล์ .htaccess ในที่เราติดตั้ง drupal เอาไว้ (ใครไม่มี .htaccess ให้สร้างเองได้ครับ) เช่น /httpdocs หรือ /httpdocs/drupal เป็นต้น และใส่ค่านี้ลงไปครับทับของเดิม # # Apache/PHP/Drupal settings: # # Protect files and directories from prying eyes. &#60;FilesMatch &#34;(\.(engine&#124;inc&#124;install&#124;module&#124;sh&#124;.*sql&#124;theme&#124;tpl(\.php)?&#124;xtmpl)&#124;code-style\.pl&#124;Entries.*&#124;Repository&#124;Root)$&#34;&#62; Order deny,allow Deny from all &#60;/FilesMatch&#62; [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://killthewhat.com/wp-content/uploads/2009/07/drupal-icon-3d-small.png" alt="drupal-icon-3d-small" title="drupal-icon-3d-small" width="123" height="185" class="alignleft size-full wp-image-3618" /><br
/> clean url ของ drupal มีประโยชน์ก็เพื่อทำให้ url นั่นอ่านง่ายขึ้นจากปกติจะมี ? อยู่ใน url เช่น<span
id="more-3614"></span></p><p>https://killthewhat.com/drupal/?q=admin/settings/clean-urls</p><p>เมื่อใช้ Clean URL ก็จะเป็น</p><p>https://killthewhat.com/drupal/admin/settings/clean-urls</p><p>โดยเมื่อตอนติดตั้ง drupal ครั้งที่แล้วผมได้ติดในเรื่องนี้ไว้ดังภาพ<br
/> <img
alt="" src="http://killthewhat.com/wp-content/uploads/2009/07/drupal13.png" title="clear-url" class="aligncenter" width="527" height="520" /></p><p>ซึ่งวิธีแก้ไขก็ไม่ยากครับให้เราเข้าไปแก้ไขไฟล์ .htaccess ในที่เราติดตั้ง drupal เอาไว้ (ใครไม่มี .htaccess ให้สร้างเองได้ครับ) เช่น /httpdocs หรือ /httpdocs/drupal เป็นต้น และใส่ค่านี้ลงไปครับทับของเดิม</p><pre class="brush: php; title: ;">
#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
&lt;FilesMatch &quot;(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root)$&quot;&gt;
  Order deny,allow
  Deny from all
&lt;/FilesMatch&gt;

# Set some options.
Options -Indexes
Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1
&lt;IfModule mod_php4.c&gt;
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
&lt;/IfModule&gt;

# PHP 4, Apache 2
&lt;IfModule sapi_apache2.c&gt;
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
&lt;/IfModule&gt;

# PHP 5, Apache 1 and 2
&lt;IfModule mod_php5.c&gt;
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
&lt;/IfModule&gt;

# Reduce the time dynamically generated pages are cache-able.
&lt;IfModule mod_expires.c&gt;
  ExpiresByType text/html A1
&lt;/IfModule&gt;

# Various rewrite rules.
&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine on

  # If your site can be accessed both with and without the prefix www.
  # you can use one of the following settings to force user to use only one option:
  #
  # If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
  # RewriteRule .* http://www.example.com/ [L,R=301]
  #
  # If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
  # RewriteRule .* http://example.com/ [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory and
  # the rewrite rules are not working properly.
  RewriteBase /

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&amp;]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&amp;]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite rules for static page caching provided by the Boost module
  # BOOST START
  &lt;IfModule mod_mime.c&gt;
  AddCharset utf-8 .html
  &lt;/IfModule&gt;
  RewriteCond %{REQUEST_URI} !^/cache
  RewriteCond %{REQUEST_URI} !^/user/login
  RewriteCond %{REQUEST_URI} !^/admin
  RewriteCond %{HTTP_COOKIE} !DRUPAL_UID
  RewriteCond %{REQUEST_METHOD} ^GET$
  RewriteCond %{QUERY_STRING} ^$
  RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}/0/%{REQUEST_URI} -d
  RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}/0/%{REQUEST_URI}/index.html -f
  RewriteRule ^(.*)$ cache/%{SERVER_NAME}/0/$1/index.html [L]
  RewriteCond %{REQUEST_URI} !^/cache
  RewriteCond %{REQUEST_URI} !^/user/login
  RewriteCond %{REQUEST_URI} !^/admin
  RewriteCond %{HTTP_COOKIE} !DRUPAL_UID
  RewriteCond %{REQUEST_METHOD} ^GET$
  RewriteCond %{QUERY_STRING} ^$
  RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}/0/%{REQUEST_URI}.html -f
  RewriteRule ^(.*)$ cache/%{SERVER_NAME}/0/$1.html [L]
  # BOOST END

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
&lt;/IfModule&gt;

# $Id: boosted.txt,v 1.4 2006/12/05 10:39:19 arto Exp $
</pre><p>*** โดยให้แก้ไข RewriteBase / ไปเป็น RewriteBase /drupal ถ้าใครติดตั้ง drupal เป็น subdirectory ***<br
/> ซึ่งถ้า hosting นั้นรองรับ mod_rewrite เราก็จะสามารถแก้ไขให้ clear url เป็น enable ได้ โดยให้ไปที่ Administrator >> Site configuration >> Clean URLs แล้วปรับเป็น Enabled ดังรูปจากนั้นกด Save Configuration<br
/> <a
href="http://killthewhat.com/wp-content/uploads/2009/07/drupal16.png" rel="lightbox[3614]"><img
src="http://killthewhat.com/wp-content/uploads/2009/07/drupal16.png" alt="drupal" title="drupal" width="630" height="252" class="aligncenter size-full wp-image-3616" /></a></p><p>เพียงเท่านี้ url ของเราก็จะไม่มี ? แล้วส่วนใครที่ <strong><a
href="http://killthewhat.com/drupal-tutorials/%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87-drupal-%E0%B8%9C%E0%B9%88%E0%B8%B2%E0%B8%99-plesk-control-panel/"></a></strong>ติดตั้ง drupal ผ่าน Plesk Control Panel ก็สบายเลยครับเพราะไม่ต้องทำไรมากเพียงแค่เข้าไป Administrator >> Site configuration >> Clean URLs เพื่อปรับให้เป็น Enable ก็เพียงพอแล้ว</p><p>via : http://drupal.org/node/121834</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%97%e0%b8%b3-clean-url-%e0%b8%9a%e0%b8%99-drupal-6/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>วิธีเพิ่มความเร็วให้ magento</title><link>http://killthewhat.com/magento-tutorials/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%80%e0%b8%a3%e0%b9%87%e0%b8%a7%e0%b9%83%e0%b8%ab%e0%b9%89-magento/</link> <comments>http://killthewhat.com/magento-tutorials/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%80%e0%b8%a3%e0%b9%87%e0%b8%a7%e0%b9%83%e0%b8%ab%e0%b9%89-magento/#comments</comments> <pubDate>Thu, 16 Jul 2009 15:30:56 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Magento]]></category> <category><![CDATA[.htaccess]]></category> <category><![CDATA[speed]]></category> <category><![CDATA[เพิ่มความเร็ว]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=3555</guid> <description><![CDATA[หนึ่งในข้อเสียเปรียบของ magento เมื่อเราใช้งานไปสักพักก็คือความเร็วของตัวเว็บไซต์ครับ ซึ่งมันจะช้าจนรู้สึกได้เมื่อเว็บเราโตขึ้นเรื่อยๆ โดยถ้าเรายังใช้ค่า config เดิมของมันที่ให้มา และผมก็ไปเจอวิธีทำให้ตัวเว็บ magento ของเราเร็วขึ้นมาได้ โดยเขาบอกว่าเพิ่มขึ้นถึง 235% ไม่รู้ว่าจริงหรือเปล่า ถ้าใครลองไปใช้แล้วรู้สึกว่าเร็วขึ้นก็แชร์ความคิดเห็นกันได้ครับ โดยให้เราแก้ไขไฟล์ .htaccess ใน magento ของเรา และเอา comment(#) ออกตาม code ด้านล่าง ############################################ ## enable apache served files compression ## http://developer.yahoo.com/performance/rules.html#gzip # Insert filter SetOutputFilter DEFLATE # Netscape 4.x has some problems… BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://killthewhat.com/wp-content/uploads/2009/07/magento_slow.png" alt="magento_slow" title="magento_slow" width="630" height="99" class="aligncenter size-full wp-image-3556" /></p><p>หนึ่งในข้อเสียเปรียบของ magento เมื่อเราใช้งานไปสักพักก็คือความเร็วของตัวเว็บไซต์ครับ ซึ่งมันจะช้าจนรู้สึกได้เมื่อเว็บเราโตขึ้นเรื่อยๆ โดยถ้าเรายังใช้ค่า config เดิมของมันที่ให้มา และผมก็ไปเจอวิธีทำให้ตัวเว็บ magento ของเราเร็วขึ้นมาได้<span
id="more-3555"></span> โดยเขาบอกว่าเพิ่มขึ้นถึง <strong>235%</strong> ไม่รู้ว่าจริงหรือเปล่า ถ้าใครลองไปใช้แล้วรู้สึกว่าเร็วขึ้นก็แชร์ความคิดเห็นกันได้ครับ</p><p>โดยให้เราแก้ไขไฟล์ .htaccess ใน magento ของเรา และเอา comment(#) ออกตาม code ด้านล่าง</p><pre class="brush: php; title: ;">
############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don’t compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary

# enable resulting html compression
php_flag zlib.output_compression on
</pre><p>via : <a
href="http://inchoo.net/ecommerce/magento/boost-the-speed-of-your-magento/">Boost the speed of your Magento</a></p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/magento-tutorials/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%80%e0%b8%a3%e0%b9%87%e0%b8%a7%e0%b9%83%e0%b8%ab%e0%b9%89-magento/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 27/55 queries in 0.022 seconds using disk

Served from: killthewhat.com @ 2012-02-09 06:15:56 -->
