ใครเก่ง .htaccess ช่วยทีครับ

เริ่มโดย xvlnw.com, 07 มกราคม 2010, 20:26:58

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

xvlnw.com

คือว่า ผมทำ URL จาก index.php?name=test ให้เป็น test/


ปัญหาคือว่า อยากให้้มันเป็น test เฉย ๆ ได้ด้วย ผมต้องเขียนอย่างไรครับ คือจะเอา / ข้างหลังออกครับ ลองเอาออกแล้ว แต่มันไม่ขึ้นครับ




:wanwan011: :wanwan011: :wanwan011: :wanwan011: :wanwan031: :wanwan031: :wanwan031:

# Rewrite Rules
RewriteRule ^index.html$  index.php  [L]
RewriteRule ^(.*)/$ index.php?j=$1
[direct=https://cloudhost.in.th/wordpress-hosting]ツ ⓌⓄⓇⒹⓅⓇⒺⓈⓈ ⒽⓄⓈⓉⒾⓃⒼ [/direct] :wanwan014:  :D
[direct=https://cloudhost.in.th/cloudhosting.html]Cloud Hosting[/direct] [direct=https://cloudhost.in.th/cloudvps.html]Cloud Server[/direct] [direct=https://cloudhost.in.th/vpshosting.html]Cloud VPS Hosting[/direct] [direct=https://cloudhost.in.th/windowsvps.html]Cloud Windows[/direct] Tel: 080-348-0843 LINE: ixvlnw

ohmohm


xvlnw.com

อ้างถึงจาก: ohmohm ใน 08 มกราคม 2010, 00:47:49
RewriteRule ^([^/]+)/?$ index.php?name=$1


ไม่ได้อ่าครับ ขอ code เต็ม ๆ หน่อยไ้ด้ไหมครับ
[direct=https://cloudhost.in.th/wordpress-hosting]ツ ⓌⓄⓇⒹⓅⓇⒺⓈⓈ ⒽⓄⓈⓉⒾⓃⒼ [/direct] :wanwan014:  :D
[direct=https://cloudhost.in.th/cloudhosting.html]Cloud Hosting[/direct] [direct=https://cloudhost.in.th/cloudvps.html]Cloud Server[/direct] [direct=https://cloudhost.in.th/vpshosting.html]Cloud VPS Hosting[/direct] [direct=https://cloudhost.in.th/windowsvps.html]Cloud Windows[/direct] Tel: 080-348-0843 LINE: ixvlnw

BUNDESLIGA

RewriteRule ^(.*)$ index.php?j=$1

อย่างนี้ได้ไหมครับคือไม่ต้องการ / ด้านท้ายใช่ป่าว

IPTM04

ของผมก็เคยจะทำแบบ จขกท. เลยแต่ไม่ได้เหมือนกันครับ ตอนนี้ เลยยังใช้ให้รีไป หน้า index แล้ว รับ url ที่เรียกเข้าไป แทน  :wanwan001:
รับโพสงาน นะครับ ติดต่อได้
[direct=http://www.kaicard.com]ขายบัตรเงินสด บัตรเติมเงิน[/direct] [direct=http://www.lotusbedding.com/TH/imp_pop_art.php]ผ้าปูที่นอน ลาย การ์ตูน[/direct]

mean

#5
แบบนี้ได้ไหมครับ

RewriteEngine On
RewriteRule $ index.php?name=$
RewriteRule /$ index.php?name=$

ลองดูนะครับไม่แน่ใจได้ไหม

หรือลอง

RewriteEngine On
RewriteRule ^(.*)$ index.php?name=$
RewriteRule ^(.*)/$ index.php?name=$

ไปหามาให้ลองครับ

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?name=$1 [R]

ปกติความลับเลยนะนิ เว่อไปไม๊นิ  :wanwan004: :wanwan020:


[direct=https://www.ireallyhost.com/]บริการโดเมน, เว็บโฮสติ้ง, SSL Certificate[/direct]
[direct=https://www.ireallyhost.com/ssl]บริการ SSL Certificate , HTTPS สำหรับเว็บไซต์[/direct]
[direct=https://www.ireallyhost.com/]บริการ Web Hosting Free! Domain name ตลอดอายุบริการ [/direct]
[direct=https://www.ireallyhost.com/domain]บริการ จดโดเมน, Free DNS Service, Domain Forwarding, จัดการโดเมนได้เอง Domain Control Panel[/direct

xvlnw.com

อ้างถึงจาก: xvlnw.com ใน 09 มกราคม 2010, 10:21:37
อ้างถึงจาก: ohmohm ใน 08 มกราคม 2010, 00:47:49
RewriteRule ^([^/]+)/?$ index.php?name=$1


ไม่ได้อ่าครับ ขอ code เต็ม ๆ หน่อยไ้ด้ไหมครับ

ได้แล้วครับ ขอบคุณมากครับ แฮะ ๆ
[direct=https://cloudhost.in.th/wordpress-hosting]ツ ⓌⓄⓇⒹⓅⓇⒺⓈⓈ ⒽⓄⓈⓉⒾⓃⒼ [/direct] :wanwan014:  :D
[direct=https://cloudhost.in.th/cloudhosting.html]Cloud Hosting[/direct] [direct=https://cloudhost.in.th/cloudvps.html]Cloud Server[/direct] [direct=https://cloudhost.in.th/vpshosting.html]Cloud VPS Hosting[/direct] [direct=https://cloudhost.in.th/windowsvps.html]Cloud Windows[/direct] Tel: 080-348-0843 LINE: ixvlnw

xvlnw.com

ขอบคุณทุก ๆ คนที่ช่วยเหลือครับ อิอิ
[direct=https://cloudhost.in.th/wordpress-hosting]ツ ⓌⓄⓇⒹⓅⓇⒺⓈⓈ ⒽⓄⓈⓉⒾⓃⒼ [/direct] :wanwan014:  :D
[direct=https://cloudhost.in.th/cloudhosting.html]Cloud Hosting[/direct] [direct=https://cloudhost.in.th/cloudvps.html]Cloud Server[/direct] [direct=https://cloudhost.in.th/vpshosting.html]Cloud VPS Hosting[/direct] [direct=https://cloudhost.in.th/windowsvps.html]Cloud Windows[/direct] Tel: 080-348-0843 LINE: ixvlnw

perfectxp

แวะมาเก็บ อยากรู้ด้วบเช่นกัน :wanwan017: