Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Wordpress paths Problem.. (https://www.warriorforum.com/programming/122262-wordpress-paths-problem.html)

M3C 8th September 2009 07:32 AM

Wordpress paths Problem..
 
Hi

If we change from a post format of something like

www.domain.com/catagory/date/postname

To

www.domain.com/postname

Is there anyway to make it so the old links redirect to where the new URL ?

ereadergold 8th September 2009 04:52 PM

Re: Wordpress paths Problem..
 
Hi Simon

I think that the best way would be to modify your .htaccess file with a line like this:

Code:

Redirect 301 /catagory/date/postname http:/ www.domain.com/postname
If you don't have access to .htaccess you could put a static PHP page at www.domain.com/catagory/date/postname/index.php and use a redirect to send traffic to the new page:

Code:

<?php
header( 'Location: www.domain.com/postname' ) ;
?>

One of these should do the trick!

Best of luck, please let me know if you need any assistance

Bill

Abledragon 8th September 2009 05:28 PM

Re: Wordpress paths Problem..
 
Simon, hi,

WordPress attempts to do the .htaccess update when you change permalinks - if it can't access your .htaccess file for any reason it will give you the code with an instruction to paste it into the file.

After saving your updates be sure to check for a message that WP will give you if it has problems.

I also use the Redirection plugin, but that's belt and braces really.

Cheers,

Martin.

M3C 9th September 2009 01:39 AM

Re: Wordpress paths Problem..
 
Thanking you both, I'll pass this on to my coder.

JonMills 9th September 2009 01:36 PM

Re: Wordpress paths Problem..
 
Simon there is also a plugin that will redirect Permalink Redirect WordPress Plugin | SYP

warrich 22nd September 2009 12:53 PM

Re: Wordpress paths Problem..
 
use can use 301 redirect rule in .htaccess file only in linux hosting


All times are GMT -6. The time now is 01:18 AM.