CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 2364|Reply: 11

URL Rewriting / mod_rewrite question (100 credits for right answer)

[Copy link]
Post time 21-9-2007 12:22 PM | Show all posts |Read mode
Ni nak mintak tolong sikit.

Katakan I ada satu website namanya http://www.shahnazz.com

Then katakan I buat macam virtual subdomain, I nak dia rewrite jadi macam ni:

http://user1.shahnazz.com --> http://www.shahnazz.com?uid=user1
http://user2.shahnazz.com --> http://www.shahnazz.com?uid=user2

Gedek-gedek dalam Google, I kena guna mod_rewrite. Kalau sesiapa boleh tolong bagi jawapan I bagi 100 kredit for your answer.

Tolong yer. Thanks.

[ Last edited by  shahnazz at 21-9-2007 12:32 PM ]
Reply

Use magic Report


ADVERTISEMENT


Post time 21-9-2007 03:41 PM | Show all posts
nak hide tau la...tapi kalo nak dummy memang tak tau
Reply

Use magic Report

 Author| Post time 21-9-2007 11:18 PM | Show all posts

Reply #2 orang_letrik's post

kalau hide u buat macam mana? use session vars ke?
Reply

Use magic Report

Post time 22-9-2007 01:52 AM | Show all posts
kalu cam nk hide tuh.. camni kot.

dari http://user1.shahnazz.com -> http://shahnazz.com

kat .htaccess tuh

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^user1\.shahnazz\.com [nc]
rewriterule ^(.*)$ http://shahnazz.com/$1 [r=301,nc]


takpun wat trick camni..

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^([a-z]+)([0-9]+).shahnazz.com http://shahnazz.com?uid=$1$2 [nc]

dari http://user1.shahnazz.com -> http://shahnazz.com?uid=user1

sori kalu salah.. aku pun dah lama tinggal..

Rate

1

View Rating Log

Reply

Use magic Report

 Author| Post time 22-9-2007 11:36 PM | Show all posts

Reply #4 liverpoolfctv's post

Huih bestnye nanti saya try.

Kalau menjadik I bagi 100 credits... thank youuuuu...
Reply

Use magic Report

Post time 24-9-2007 08:30 PM | Show all posts
wahh 100?? kalu camtuh.. kene bsunguh2 nih..
Reply

Use magic Report

Follow Us
Post time 8-10-2007 06:14 AM | Show all posts
aik shannaz senyap jer.. btul tak btul coding i kasi tuh..
Reply

Use magic Report

 Author| Post time 9-10-2007 01:59 AM | Show all posts
sabo, lum try live lagi, jgn takut kalau betul jadik i bagi 100 kredit yer, sibuk sikit ngan project lain
Reply

Use magic Report


ADVERTISEMENT


Post time 19-10-2007 09:47 AM | Show all posts
hang nih keje it ker?? byk project lak tuh
Reply

Use magic Report

 Author| Post time 19-10-2007 11:27 AM | Show all posts

Reply #9 liverpoolfctv's post

yeh... skang tengah sibuk beraye

ada projek ker? he he he
Reply

Use magic Report

 Author| Post time 31-10-2007 05:12 PM | Show all posts

Reply #7 liverpoolfctv's post

Here's a good link...

http://www.ilovejackdaniels.com/ ... ewrite-cheat-sheet/

Anyway 100 credits for you... betul tak betul, tak tau lagi, still mengetest, but thank you for your input.
Reply

Use magic Report

Post time 10-11-2007 11:44 AM | Show all posts
aku pun tak pernah try, tapi rasanya cara yang diberi oleh bro/sis kat atas tu dah betul sebab aku pernah baca, nak buat mod_rewrite kena letak something kat .htaccess

hehehe
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

5-1-2025 08:43 AM GMT+8 , Processed in 0.232733 second(s), 23 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list