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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 07-13-2012, 08:59 PM   #1
OneHungLo
So Fucking Banned
 
Industry Role:
Join Date: May 2001
Location: Your mom's front hole
Posts: 40,906
301 redirect help

I have an old site that I want to redirect into another site.

I have this on my old site:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newsite.com/$1 [R=301,L]

With this, whenever you visit a url from the old site, for example: www.oldsite.com/hello.html it redirects to www.newsite.com/hello.html

How to I set it up to redirect www.oldsite.com/whatever.html to
www.oldsite.com/

?

Thanks
OneHungLo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-13-2012, 09:06 PM   #2
papill0n
Unregistered Abuser
 
Industry Role:
Join Date: Oct 2007
Posts: 15,547
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
papill0n is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-13-2012, 09:23 PM   #3
OneHungLo
So Fucking Banned
 
Industry Role:
Join Date: May 2001
Location: Your mom's front hole
Posts: 40,906
Thanks, but that's not cutting it.

I forgot to mention there are no urls on the server of the olddomain.com

There used to be but not anymore and I need to 301 these all into my newdomain.com

Do I need to specify in the redirect all the urls on the old domain if they are not there?

Everything im trying is just redirecting olddomain.com/oldurl.html to newdomain.com/oldurl.html
OneHungLo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-13-2012, 09:37 PM   #4
papill0n
Unregistered Abuser
 
Industry Role:
Join Date: Oct 2007
Posts: 15,547
this works for me here

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
papill0n is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-13-2012, 09:40 PM   #5
OneHungLo
So Fucking Banned
 
Industry Role:
Join Date: May 2001
Location: Your mom's front hole
Posts: 40,906
Quote:
Originally Posted by papill0n View Post
this works for me here

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
Yeah, I have that, and when I visit http://www.olddomain.com/ it goes to http://www.newdomain.com/ which is fine, but when I visit http://www.olddomain.com/whatever.html it goes to http://www.newdomain.com/whatever.html

I need it to redirect http://www.olddomain.com/whatever-url-someone-hits.html to http://www.newdomain.com/
OneHungLo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-13-2012, 09:49 PM   #6
papill0n
Unregistered Abuser
 
Industry Role:
Join Date: Oct 2007
Posts: 15,547
ok you should put a 404 on the old domain that redirects everything to the root first
papill0n is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.