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 10-03-2013, 09:17 AM   #1
EN1GMA
Confirmed User
 
EN1GMA's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 1,251
Need help with .htaccess and 301 Redirect

Hi guys,

I need some urgent help... maybe someone can help me!

I have a wordpress website and the traffic was going fine!
But since I removed something from my URLs, I received many notifications on webmaster tools about 404 errors and my traffic has dropped from 400 daily to only 30.

My old url was:
domain.com/reviews/post_title

Now is:
domain.com/post_title

So what I did was removing the /reviews/ from the URL.

I notice that in google search results, all urls that appears is without /reviews/ but my SEO guy said that is better to do a 301 redirect so I can recover my traffic back.

I have read this advice from Matt Cutts:
https://support.google.com/webmaster...er/93633?hl=en

And he said that I need to fix this via htaccess right?
I need to get all of the listed 404s in webmaster tools 301 redirected to the proper url so that I can mark all as fixed, right?

Does anyone know the command to do that?
Only need to redirect 404 urls to new working urls.

From this:
domain.com/reviews/post_title

To this:
domain.com/post_title

Btw, this is my htaccess content:
Code:
# BEGIN WordPress<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


# END WordPress
Anyone? Please?

Thank you!

Best regards
EN1GMA is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-03-2013, 09:24 AM   #2
EN1GMA
Confirmed User
 
EN1GMA's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 1,251
I forgot to tell something about my old urls... all of them ends in a .php
So the changes was:

From this:
domain.com/reviews/post_title.php

To this:
domain.com/post_title/

Can someone help me?
EN1GMA is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-03-2013, 01:45 PM   #3
gracesfall
Confirmed User
 
gracesfall's Avatar
 
Industry Role:
Join Date: Sep 2013
Location: Florida
Posts: 252
How many posts are we talking about? If there aren't *that* many, you can redirect each individual post. Beneath # END WordPress in your .htaccess file, add something like the following:

Code:
# 301 Redirects

Redirect 301 /reviews/post_title http://domain.com/post_title/
Redirect 301 /reviews/post_title2 http://domain.com/post_title2/
Redirect 301 /reviews/post_title3 http://domain.com/post_title3/
Redirect 301 /reviews/post_title4 http://domain.com/post_title4/
Make sense?

Cheers,

Cyndi
__________________
-= gracesfall =-

FreeLesbianPornBlog.com
Follow me on Twitter: https://twitter.com/gracesfall
Like me on Facebook: Free Lesbian Porn Blog
Hit me up on ICQ: 663050376

Domains for Sale: DaddyWhoreBucks.com | YoungAndFuckable.com | KnobGobblers.com
gracesfall is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-03-2013, 02:02 PM   #4
Fetish Gimp
Confirmed User
 
Industry Role:
Join Date: Feb 2005
Posts: 1,699
What you need is to use Apache's mod_rewrite to redirect (rewrite) requests for
domain.com/reviews/(whatever)
to
domain.com/(whatever) and send the 301 status

So you would add something like this on your .htaccess file

Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^reviews/(.*)$ http://domain.com/$1 [R=301,L]
</IfModule>
Oops, didn't see the .php post issue until later. Code I posted wouldn't work under those circumstances.

You might want to try this plugin
http://wordpress.org/plugins/rewrite/
__________________
Strapon Seduction - femdom blog | Twitter

Last edited by Fetish Gimp; 10-03-2013 at 02:05 PM..
Fetish Gimp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-03-2013, 02:55 PM   #5
gracesfall
Confirmed User
 
gracesfall's Avatar
 
Industry Role:
Join Date: Sep 2013
Location: Florida
Posts: 252
BTW - the code I posted will work even with the .php file extension in the URL.
__________________
-= gracesfall =-

FreeLesbianPornBlog.com
Follow me on Twitter: https://twitter.com/gracesfall
Like me on Facebook: Free Lesbian Porn Blog
Hit me up on ICQ: 663050376

Domains for Sale: DaddyWhoreBucks.com | YoungAndFuckable.com | KnobGobblers.com
gracesfall is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-04-2013, 03:51 AM   #6
EN1GMA
Confirmed User
 
EN1GMA's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 1,251
Thank you very much guys
EN1GMA is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-04-2013, 04:43 AM   #7
Maqua
E.M.O
 
Maqua's Avatar
 
Industry Role:
Join Date: Feb 2001
Location: Possum Lodge
Posts: 2,028
Handy site http://www.htaccesstools.com/test-hotlink-protection/
__________________
T.G.D Two Guys Domains, In business since 1997, lets make$$ EMO Domains, your one stop shop for premium and expired domains!! Twitter @maquaed or Email maqua @ tgtld.ca, Keep your stick on the ice!!
Maqua 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.