Go Back   BWHacks > Development > Web Development

Web Development Website design and programming, content development. It's all here.

Closed Thread
 
LinkBack Thread Tools

Old 02-05-2008, 02:43 AM   #1 (permalink)
K? Pŕo?ćtiόnŹ
=)
Senior Member
Retired Staff Member

Messiah
 
K? Pŕo?ćtiόnŹ's Avatar
 
Join Date: Oct 2004
Location: Okinawa
Posts: 9,131
K? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond repute
Send a message via AIM to K? Pŕo?ćtiόnŹ
Default .htaccess ='(

I needs some helpz.

.htaccess is probably the hardest thing to mess with ever.

I need to do this

I want to redirect links like

www.kcdan.com/a983m

the ending will always be a 5 character length string and I want to redirect it to

www.kcdan.com/fileto.php?id=a983m

But this **** has got me so ****ing confuzzled.

Introduction to mod_rewrite and some basic examples
__________________
K? Pŕo?ćtiόnŹ 15 0FF11|\|3  

Old 02-05-2008, 03:18 AM   #2 (permalink)
lpxxfaintxx
I hate Steve Jobs.
Senior Member
Gold Member

Enlightened
 
Join Date: Jun 2005
Location: Fullerton, CA
Posts: 3,078
lpxxfaintxx has much to be proud oflpxxfaintxx has much to be proud oflpxxfaintxx has much to be proud oflpxxfaintxx has much to be proud oflpxxfaintxx has much to be proud oflpxxfaintxx has much to be proud of
Send a message via AIM to lpxxfaintxx Send a message via MSN to lpxxfaintxx Send a message via Skype™ to lpxxfaintxx
Default

Try taking a look at various tutorials, some are easier to understand.

mod_rewrite, a beginner's guide (with examples)
mod_rewrite: A Beginner's Guide to URL Rewriting [Apache & IIS Configuration]
__________________
lpxxfaintxx 15 0FF11|\|3  

Old 02-05-2008, 05:17 AM   #3 (permalink)
XGhozt
The Friendly Ghozt.
Gold Member

Crusader
 
XGhozt's Avatar
 
Join Date: Apr 2005
Location: California
Posts: 3,773
XGhozt is a name known to allXGhozt is a name known to allXGhozt is a name known to allXGhozt is a name known to all
Send a message via ICQ to XGhozt Send a message via AIM to XGhozt Send a message via MSN to XGhozt Send a message via Yahoo to XGhozt Send a message via Skype™ to XGhozt
Default

That's odd, most of the time people want to do it the other way around. Most of the time (for example) index.php?bleh=page01 gets rewritten to page-01.html or /page01/. For the other way around it's probably easier to do it with php.

Why do you want to make the link more complicated? Just curious.
__________________

Ghoztcraft - Gaming Made Easy

XGhozt 15 0FF11|\|3  

Old 02-05-2008, 05:31 AM   #4 (permalink)
arpsmack

Advocate
 
arpsmack's Avatar
 
Join Date: Feb 2005
Posts: 329
arpsmack is a jewel in the rough
Default

This should work depending on how much regular expression support there is:
Code:
RewriteEngine on
RewriteRule www\.kcdan\.com/([a-zA-Z0-9]{5})$ www.kcdan.com/fileto.php?id=$1
            ^--------------^
I think you might be able to strip every thing in this range though...

Last edited by arpsmack : 02-05-2008 at 05:40 AM.
arpsmack 15 0FF11|\|3  

Old 02-05-2008, 10:19 AM   #5 (permalink)
K? Pŕo?ćtiόnŹ
=)
Senior Member
Retired Staff Member

Messiah
 
K? Pŕo?ćtiόnŹ's Avatar
 
Join Date: Oct 2004
Location: Okinawa
Posts: 9,131
K? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond repute
Send a message via AIM to K? Pŕo?ćtiόnŹ
Default

Quote:
Originally Posted by XGhozt View Post
That's odd, most of the time people want to do it the other way around. Most of the time (for example) index.php?bleh=page01 gets rewritten to page-01.html or /page01/. For the other way around it's probably easier to do it with php.

Why do you want to make the link more complicated? Just curious.
Im not, Im turning www.kcdan.com/12345 into www.kcdan.com/fileto.php?id=12345. Which means they can write www.kcdan.com/12345 instead of the .php ****.
__________________
K? Pŕo?ćtiόnŹ 15 0FF11|\|3  

Old 02-06-2008, 05:55 AM   #6 (permalink)
Polie13
****ING COCK SUCKER
Senior Member

High Priest
 
Polie13's Avatar
 
Join Date: Jan 2005
Posts: 1,745
Polie13 is just really nicePolie13 is just really nice
Default

Wouldn't this be easier to do by just modifying your 404 page?
__________________


Quote:
Originally Posted by 707
I
HATE
GIRLS
[08:11] 707: I'm sick, I want to throw up so bad.
[08:11] Polie13: you can throwup on me if itll help
[08:12] 707: *throws up on your dick*
[08:12] 707: WTF OWNED
[08:12] Polie13: *masturbates with the vomit on it*
[08:12] 707: 2GUYS1MOUTH
Polie13 15 0FF11|\|3  

Old 02-08-2008, 12:54 AM   #7 (permalink)
K? Pŕo?ćtiόnŹ
=)
Senior Member
Retired Staff Member

Messiah
 
K? Pŕo?ćtiόnŹ's Avatar
 
Join Date: Oct 2004
Location: Okinawa
Posts: 9,131
K? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond repute
Send a message via AIM to K? Pŕo?ćtiόnŹ
Default

I'm pretty ****ing sure, you're a fag. And I've got no idea what the **** the 404 page is, so stfu. Also, my problem has been fixed so gtf out of this thread becuase it's closed.
__________________
K? Pŕo?ćtiόnŹ 15 0FF11|\|3  
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 07:39 AM.


vBulletin style developed by Transverse Styles

Powered by vBulletin Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
Copyright © 2004-2008 BWHacks
Ad Management by RedTyger