

![]() |
![]() |
|
|||||||
![]() |
![]() |
| Web Development Website design and programming, content development. It's all here. |
![]() |
|
|
LinkBack | Thread Tools |
![]() |
![]() |
|
|
#1 (permalink) |
|
=)
Senior Member
Retired Staff Member ![]() ![]() ![]() ![]() Messiah |
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
__________________
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#2 (permalink) |
|
I hate Steve Jobs.
Senior Member
Gold Member ![]() ![]() ![]() ![]() Enlightened |
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]
__________________
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#3 (permalink) |
|
The Friendly Ghozt.
Gold Member
![]() ![]() ![]() ![]() ![]() Crusader |
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. |
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#4 (permalink) |
![]() ![]() ![]() Advocate Join Date: Feb 2005
Posts: 329
![]() |
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. |
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#5 (permalink) | |
|
=)
Senior Member
Retired Staff Member ![]() ![]() ![]() ![]() Messiah |
Quote:
__________________
|
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#6 (permalink) | |
|
****ING COCK SUCKER
Senior Member
![]() ![]() High Priest Join Date: Jan 2005
Posts: 1,745
![]() ![]() |
Wouldn't this be easier to do by just modifying your 404 page?
__________________
![]() ![]() ![]() Quote:
[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 |
|
|
|
![]() |
![]() |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
| All times are GMT. The time now is 07:39 AM. |

