![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Tap into MOBILE!
Industry Role:
Join Date: Jul 2003
Location: Hollywood
Posts: 11,779
|
I have a quick question for programmers or server admins
Let say I want to make a rule in htaccess that when a user types mydomain.com/xxxxxxx
it will redirect them to another site otherdomain.com/folder/xxxxxxx/folder... so basically its taking what they put after the url and inserting it in another url that it will redirect them to. what's the best way to go about this? thanks in advance ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
Mod Rewrite FTW
icq: 33375924 I'll hook it up for you for a few bucks ![]()
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Coupon Guru
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
|
Redirect /folder http://www.example.com/newfolder
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more! AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Tap into MOBILE!
Industry Role:
Join Date: Jul 2003
Location: Hollywood
Posts: 11,779
|
to clarify
the xxxxxxx = different each time (username) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
So Fucking Banned
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
|
kuniiiiiiiiiiiiiiiiiiiiiii
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Fake Nick 1.0
Industry Role:
Join Date: Oct 2005
Location: Rent free, your head
Posts: 27,652
|
__________________
PLEASE WAIT WHILE BIDEN ADMIN UNINSTALLS ITSELF..... ██████████████████▒ 99.5% complete. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Marina WILL have my babies!
Industry Role:
Join Date: May 2003
Posts: 9,234
|
He's not trying to do a regular redirect... he wants the the id in the url to carry over within the url it will be redirected to.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Coupon Guru
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
|
you'll need some PHP for that.
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more! AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Sep 2003
Location: NZ
Posts: 673
|
Can be done with mod_rewrite exclusively.
__________________
-- react |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,214
|
maybe something like this?
Code:
Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC] RewriteRule ^([a-z0-9]+)$ http://otherdomain.com/folder/$1/folder [NC,R=301,L]
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Marina WILL have my babies!
Industry Role:
Join Date: May 2003
Posts: 9,234
|
Quote:
This does not work if its something like domain.com/xx-xxxx-xxxxx ...we need it to work in both situations. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
It's 42
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
|
Code:
RedirectMatch 301 ^/(.*)$ http://static.askapache.com/$1 http://www.google.com/cse/home?cx=00...%3Akk7rwc2gx0i |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
Marina WILL have my babies!
Industry Role:
Join Date: May 2003
Posts: 9,234
|
Quote:
I got Fris's code to work by adding a - after the 9 in the rewrite rule... RewriteRule ^([a-z0-9-]+) do you know what line I should put if I want the regular typeins redirected to a whole other site such as just www.yahoo.com ? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Quote:
Code:
RedirectMatch 301 ^/*$ http://www.yahoo.com/ RedirectMatch 301 ^/(.*)$ http://static.askapache.com/$1 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,214
|
Quote:
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |