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.

 

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help.

 
Thread Tools
Old 01-31-2014, 01:07 PM   #1
Moren
Registered User
 
Join Date: May 2005
Posts: 20
.htaccess and 301 Redirect

Hi
I try to do some redirection, I want to redirect all blog post from my sub-domain ( but not from main sub-domain page) to my domain category page.

sub.domain.com/all-post/ to domain.com/category/

(or even better to domain.com/category/random-post/ - but I don't believe that is possible... )

And I want to keep the main page of my sub-domain.

Thanks!
Moren is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-01-2014, 12:11 AM   #2
PornCious
Registered User
 
Industry Role:
Join Date: Nov 2012
Posts: 50
did you try this www htaccessredirect dot net
PornCious is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-01-2014, 05:56 AM   #3
Moren
Registered User
 
Join Date: May 2005
Posts: 20
I do not get what I need...
Moren is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-03-2014, 08:11 PM   #4
PornCious
Registered User
 
Industry Role:
Join Date: Nov 2012
Posts: 50
Following is the basic redirection. However, looks like you need multiple filtration which should not be impossible...
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.yourdomain.com$
RewriteRule ^(.*)$ http://yourdomain.com/$1 [R=301,L]
Try asking an apache expect in stackexchange or stackoverflow.

You will need one adddition line like RewriteCond %{REQUEST_URI} before rewrite rule.
PornCious is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-04-2014, 12:15 AM   #5
David-PD
Confirmed User
 
David-PD's Avatar
 
Industry Role:
Join Date: Nov 2013
Posts: 234
If u want to redirect to random post u need to use php or any other lang ur using.
__________________

PornDeals.com - WebcamDeals.com - GayDeals.com - PornCoupons.com new!

david{att}porndeals{dott}com (email)
porndeals.d (skype)

--

Looking for HQ hardlinks in all niches!!!

--

Looking to buy websites with income & stable traffic! Contact me if you have something interesting
David-PD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-10-2014, 09:40 PM   #6
Barry-xlovecam
It's 42
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
Code:
301 Redirect Entire Directory ^

RedirectMatch 301 /blog(.*) http://www.askapache.com/$1
try out in that sub domain's .htaccess
Code:
RedirectMatch 301 /all-post(.*)  http://domain.com/category/$1
http://www.askapache.com/htaccess/htaccess.html if the above won't work read the code posts here.
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-14-2014, 11:30 AM   #7
Moren
Registered User
 
Join Date: May 2005
Posts: 20
I buy on fiverr for 5$ this htaccess code, and it is working for me:

Code:
RewriteCond %{HTTP_HOST} ^boobs\.domain\.c o m [NC]
RewriteCond %{REQUEST_URI} ^/([0-9]{4})/([0-9]{2})/([^/]+)/$
RewriteRule (.+) h t t p://domain.c o m/category/boobs-busty/ [R=301,L]
Moren is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-15-2014, 12:07 AM   #8
PornCious
Registered User
 
Industry Role:
Join Date: Nov 2012
Posts: 50
Quote:
Originally Posted by Moren View Post
I buy on fiverr for 5$ this htaccess code, and it is working for me:

Code:
RewriteCond %{HTTP_HOST} ^boobs\.domain\.c o m [NC]
RewriteCond %{REQUEST_URI} ^/([0-9]{4})/([0-9]{2})/([^/]+)/$
RewriteRule (.+) h t t p://domain.c o m/category/boobs-busty/ [R=301,L]

i knew about REQUEST_URI but couldn't figure it out. lol thanks for sharing with us! it might save 5 bucks for many.
PornCious is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
 
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.