Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    WordPress permalink redirect question
    I have a non-WP site, which has only pages that end in the .php extension.

    I want to revamp that site completely by putting in WordPress. I will create a WP page of affiliate products with each WP page being identical to one of the original .php page.

    When I set up the Permalink structure in WP, how can I handle it so that any Google or other SE listings currently there for that website will go to the correct WP page?

    In other words, I have a page now that's indexed with this URL:

    http://www.buywidgetshere.com/buy-red-widgets.php

    That is a distinct page on my current site (I'm using made-up names, of course).

    The new site will have a WordPress page equivalent to that. But using the permalink structure I normally use it would be:

    http://www.buywidgetshere.com/buy-red-widgets/

    BUT -- If I create the Permalink structure on WP using /%postname%.php, it SHOULD give me the correct WP URl to the page as:

    http://www.buywidgetshere.com/buy-red-widgets.php

    That would make the URL identical to the URLs already indexed in Google. Will that custom structure work with WP? Will I have any glitches in the internal structure of the site?

    Any better ideas using a plugin of some sort? Any suggestions at all?

    I want to convert from the current php site to a WP install because I want to revamp all my affiliate listings on the site from current PopShops displays of mostly CSN stuff to Amazon products using a WordPress plugin I bought that creates Amazon listings.

    Thanks.
    Generate more fake news.

  2. #2
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Just did a test using a Permalink Migration plugin. If I go to a test website I have and change the current permalink structure from:

    /%postname%/

    to

    /%postname%.html

    I get page URLs like this:

    /buy-red-widgets.html

    The Permalink Migration plugin finds those when I click on an equivalent page in Google and goes to the right place.

    BUT --

    If I do the same thing to that test site using /%postname%.php instead of /%postname%.html -- the whole thing messes up.

    With the .php ending on the permalink instead of .html, the URLs from Google don't redirect to the correct page, but just as frustrating -- the internal URLs give me 404 errors when I click on them at the test blog website.

    Any suggestions??

    Thanks.
    Generate more fake news.

  3. #3
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Okay -- at the risk of talking to myself here (LOL!), I think I discovered part of the problem trying to do the .php structure on my /%postname%.php custom permalinks.

    When I change the permalink structure to that .php extension, it works for PAGES that I create on my test website, but NOT for blog posts.

    So I guess I could create the structure for the site I'm revamping, then make sure I make only pages and not posts.

    Hmmm.....

    Any thoughts? Comments? Help??

    Thanks again.
    Generate more fake news.

  4. #4
    Full Member suzie250's Avatar
    Join Date
    May 5th, 2005
    Posts
    416
    Gary, I changed a static site over to wordpress about a year ago. The first thing that I did was a redirect in .htaccess to remove the php file extension on the original site. I left it alone for awhile so that the spiders would index those pages without the .php.

    Partially did that because it's such a major change that I did not want to lose any ranking before doing the switch.

    There is a plugin to remove the word "category". I'll go see what it is and I'll see how I have my permalinks set up.

    I had a post about the whole process that I went through and dumb#&^ me, accidenlty deleted my whole database. lol
    I disagree with Kay Jewelers. I would bet on any given Friday or Saturday night more kisses begin with Bud Lite than Kay.

  5. #5
    Full Member suzie250's Avatar
    Join Date
    May 5th, 2005
    Posts
    416
    WP No Category Base - This removes /category from your permalinks so you have:
    www.yoursite.com/yourcategoryname/yourpage
    instead of
    http://www.yoursite.com/category/you...yname/yourpage

    I have this in htaccess
    ### Externally redirect to remove ".php" if the user adds it
    RewriteCond %{THE_REQUEST} ^GET\ /([^/]+/)*[^.]+\.php(\?[^\ ]*)?\ HTTP/
    RewriteRule ^(([^/]+/)*[^.]+)\.php$ http://www.mysite.com/$1 [R=301,L]

    You can also put html in there also but I'm not sure how to do an and/or
    I also HAD this working perfectly at one point, but I changed something and it doesn't work any longer. Requests for any files ending in .php now get a 404. But I don't really care because most of those request come from spiders with old information.

    Are the two sites you are playing with on the same host? Sometimes I run into an issue of the same rule does not work on different hosts, unless changed a bit.
    I disagree with Kay Jewelers. I would bet on any given Friday or Saturday night more kisses begin with Bud Lite than Kay.

  6. #6
    Full Member suzie250's Avatar
    Join Date
    May 5th, 2005
    Posts
    416
    Sorry forgot to add:

    My permalinks are set like this:
    /%category%/%postname%

    I do not use an ending slash on my sites

    If I'm just making things worse for you, let me know and I'll shut up!
    I disagree with Kay Jewelers. I would bet on any given Friday or Saturday night more kisses begin with Bud Lite than Kay.

  7. #7
    Full Member suzie250's Avatar
    Join Date
    May 5th, 2005
    Posts
    416
    After reading your posts again, I'll bet if you remove the word category with the plugin, your posts should redirect correctly.
    I disagree with Kay Jewelers. I would bet on any given Friday or Saturday night more kisses begin with Bud Lite than Kay.

  8. #8
    Comfortably Numb John Powell's Avatar
    Join Date
    October 17th, 2005
    Location
    Bayou Country, LA
    Posts
    3,432
    PHP Code:
    <?
    Header
    "HTTP/1.1 301 Moved Permanently" );
    Header"Location: http://www.domain.com/redirect-to-new-page.php" );
    die();
    ?>
    Try putting this at the top of your old pages. At the very extreme top before anything else. The url will be your new page.


  9. #9
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Quote Originally Posted by suzie250
    After reading your posts again, I'll bet if you remove the word category with the plugin, your posts should redirect correctly.
    Suzie, I'm not sure what you're reading. I don't have the category showing on anything. Perhaps I was unclear.
    Generate more fake news.

  10. #10
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Quote Originally Posted by John Powell
    PHP Code:
    <?
    Header
    "HTTP/1.1 301 Moved Permanently" );
    Header"Location: http://www.domain.com/redirect-to-new-page.php" );
    die();
    ?>
    Try putting this at the top of your old pages. At the very extreme top before anything else. The url will be your new page.
    John, the old pages will no longer exist, so I can't redirect traffic that's coming to them to anything.

    I am planning on deleting the old "static" site and replacing it with a WP install, creating WP pages with identical URLs to those of the old pages, and hoping to find a way to keep my SERP listings that way.

    The reason behind all this is that I get about ZERO clickthroughs and conversions with the current site using PopShops and CSN Stores. But I get a fair flow of daily traffic.

    I have a plugin that'll create nice Amazon product pages in WP, and I can find almost identical Amazon products for the ones I'm currently trying from CSN Stores.

    Anyway, thanks John and Suzie, for your suggestions. I'll keep fiddling around with it.

    What I need is some WP guru out there who can tell me how to create WP permalinks for pages using the .php extension, I guess??
    Generate more fake news.

  11. #11
    Comfortably Numb John Powell's Avatar
    Join Date
    October 17th, 2005
    Location
    Bayou Country, LA
    Posts
    3,432
    Quote Originally Posted by writerguy
    I am planning on deleting the old "static" site and replacing it with a WP install,
    My thinking is that you could leave the pages there until everything settles. Your serp traffic will find the correct pages and Google will see the old pages and 301 over to the new ones. That is the way Google likes it.


  12. #12
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Quote Originally Posted by John Powell
    My thinking is that you could leave the pages there until everything settles. Your serp traffic will find the correct pages and Google will see the old pages and 301 over to the new ones. That is the way Google likes it.
    I'm not sure how I leave the old pages on the server and create new pages in WP -- and have both the old pages and new WP setup online at the same time? What am I misunderstanding (probably a lot)?

    I think I've found my solution in a plugin. It's called the ".html on PAGES" plugin. It's a fairly simple one-page plugin script. I went into it in a text editor and replaced each instance of .html with .php, then uploaded it to my test site.

    I perfectly turns the WP permalink I have into the same URL with .php on the end of it. I can therefore create WP pages with identical slugs/permalinks/whatever URLs to the static pages I will be replacing. It should work. We'll see.

    The site I'm messing around with is only about 15 pages. I'll keep those offline with no changes while I install and rebuild the site with WP. Then I'll do a "site:" search in Google, click on the pages that are indexed and see what happens.

    If I've messed something up completely, I'll just delete WP and reload the static site that was there.
    Generate more fake news.

  13. #13
    SEO: A Specialty - Web Design: Slow or outsourced andbeyond's Avatar
    Join Date
    June 18th, 2006
    Location
    The Call is coming from Inside the House!
    Posts
    1,332
    You know if it is just 15 pages it would be quite easy to just make an htaccess with the 15 pages listed out and redirecting to the correct new page.

    for a 301 redirect the old pages do not have to be on the server. It is a root Apache thing telling the server if they are looking for one page send them to a different page and tell any spiders, that is the new home.

    In a month or two you should see Google drop all the old urls in the Serps and then you can pull off the htaccess portion that redirects.

    I would do that and just ditch the .php ending and end with a slash.

    htaccess creation can be a real chore if there are thousands of pages, hard to understand naming structure or session ids, and clients that do not want SEO to decrease even for a few weeks.

    This is a perfect project to get your feet wet on htaccess. There are quite a few resources in Google.

    On this page: http://www.dailyblogtips.com/how-to-...-301-redirect/

    <<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>

    Apache .htaccess Singe Page Redirect

    In order to use this method you will need to create a file named .htaccess (not supported by Windows-based hosting) and place it on the root directory of your website, then just add the code below to the file.

    Redirect 301 /old/oldpage.htm /new/http://www.domain.com/newpage.htm

    <<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>

    With that method you can mod the htaccess in root that came with Wordpress and just add that line 15 times changing the oldpage and newpage.

    Might try with just one and you can make sure it works and does not affect your WP install.

    BTW deactivate all redirection plugins before trying. THis is simple and core to LAMP and does not require a plugin.

    .php is so 2002. JK

  14. #14
    ABW Ambassador Rehan's Avatar
    Join Date
    November 3rd, 2006
    Location
    Toronto
    Posts
    536
    Quote Originally Posted by andbeyond
    You know if it is just 15 pages it would be quite easy to just make an htaccess with the 15 pages listed out and redirecting to the correct new page.
    This is an excellent solution if you have just 15 pages.
    --

  15. #15
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    All right. You guys have convinced me. I've piddled around just a little bit with .htaccess for stuff I absolutely needed to do, but not very much at all.

    Looks pretty straightforward, though.

    While we're on the subject -- what's the benefit on using the ending slash (/) on a URL instead of just setting up a permalink structure in WP with no ending slash?

    Thanks for all your help.
    Generate more fake news.

  16. #16
    Full Member suzie250's Avatar
    Join Date
    May 5th, 2005
    Posts
    416
    I *think* I started using mine without the slash because to me a slash indicates there is more after it (as if it were a directory). There is more info out there about using the slash or no slash but I'm on my way out the door right now. I'm sure if you did a search you can find more.
    I disagree with Kay Jewelers. I would bet on any given Friday or Saturday night more kisses begin with Bud Lite than Kay.

  17. #17
    Full Member suzie250's Avatar
    Join Date
    May 5th, 2005
    Posts
    416
    Gary,

    Here is a GREAT article about site structure and about halfway down talks about ending slashes.

    http://webtips.dan.info/subdir.html
    I disagree with Kay Jewelers. I would bet on any given Friday or Saturday night more kisses begin with Bud Lite than Kay.

  18. #18
    Member JohnHawkins's Avatar
    Join Date
    October 12th, 2009
    Location
    Las Vegas, NV
    Posts
    72
    There is a 301 redirect manager plugin for WordPress that is pretty darn simple.

    http://wordpress.org/extend/plugins/...301-redirects/

    This is way easier to use than dealing with the .htaccess file and won't bork your system if you fat-finger an entry...

  19. #19
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Quote Originally Posted by JohnHawkins
    There is a 301 redirect manager plugin for WordPress that is pretty darn simple.

    http://wordpress.org/extend/plugins/...301-redirects/

    This is way easier to use than dealing with the .htaccess file and won't bork your system if you fat-finger an entry...
    Thanks, John. I actually installed that and it is indeed simple to use. Unfortunately, it falls under the category of "nothing is fool proof because fools are so darn clever," or something. I put the URL of the static site page that's indexed in Google in the "Request" blank. Then I put the URL of the current or new WP page in the blank for "Destination." Then I saved it.

    I then went into Google, found the old page listed there and clicked on it. It took me directly to a 404 error message.

    Any ideas what I did wrong?
    Generate more fake news.

  20. #20
    Member JohnHawkins's Avatar
    Join Date
    October 12th, 2009
    Location
    Las Vegas, NV
    Posts
    72
    OK, try this...
    In the request box, rather than putting the entire URL in there, just use the path and file name. So, for example if the old page is located here:
    http://mysite.com/some-category/page.html
    In the box you would just put:
    /some-category/page.html

    Give this a shot and let me know!

  21. #21
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Quote Originally Posted by JohnHawkins
    OK, try this...
    In the request box, rather than putting the entire URL in there, just use the path and file name. So, for example if the old page is located here:
    http://mysite.com/some-category/page.html
    In the box you would just put:
    /some-category/page.html

    Give this a shot and let me know!
    Nope. Still get a 404. Seems like it should work, doesn't it? I've heard other folks say that Simple Redirect plugin is great.

    Won't work using the URL of the old page; won't work using just the shortened /page.php either.
    Generate more fake news.

  22. #22
    Member JohnHawkins's Avatar
    Join Date
    October 12th, 2009
    Location
    Las Vegas, NV
    Posts
    72
    Indeed, that is odd!!

    I can't get PM's yet, but you can email me some details at john [at] 9seeds [dot] com. I'm happy to log in and have a look if you'd like. At this point, I'm just curious what the heck it could be...

  23. #23
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Quote Originally Posted by JohnHawkins
    Indeed, that is odd!!

    I can't get PM's yet, but you can email me some details at john [at] 9seeds [dot] com. I'm happy to log in and have a look if you'd like. At this point, I'm just curious what the heck it could be...
    Thanks, John. I'll probably take you up on that offer later today or tomorrow when I can get some time to really get down to it.
    Generate more fake news.

  24. #24
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Okay, so now that's just weird. Probably because "redirection/redirecting" is like a foreign language to me, I was doing something wrong.

    I moved my test WP set up for the site this thread concerns from the "/test" directory to the root directory, deleting the static *.php pages I was concerned about.

    I then set up Simple 301 Redirect plugin options for the missing pages, redirecting them as suggested in one of John Hawkins' post above -- and it worked.

    It works perfectly and my site is now on the way to simply making me millions and millions of dollars, probably by Friday. (LOL!!!!!)

    Thanks all who spent time on this thread and offered helpful suggestions.
    Generate more fake news.

  25. #25
    Member JohnHawkins's Avatar
    Join Date
    October 12th, 2009
    Location
    Las Vegas, NV
    Posts
    72
    Woo hoo!! That's great. I love it when stuff just works itself out like that!

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Redirect with New Permalink
    By gcarson in forum Blogging, Mobile and Social Media
    Replies: 4
    Last Post: April 27th, 2010, 04:17 AM
  2. Wordpress Permalink query
    By andyparks16 in forum Blogging, Mobile and Social Media
    Replies: 3
    Last Post: February 8th, 2010, 12:46 AM
  3. Permalink Settings In Wordpress
    By Trust in forum Blogging, Mobile and Social Media
    Replies: 18
    Last Post: August 29th, 2009, 04:58 PM
  4. Question About Norton Redirect
    By Doug247 in forum Midnight Cafe'
    Replies: 0
    Last Post: July 27th, 2004, 11:32 AM
  5. Redirect to new site Question
    By ~Michelle in forum Search Engine Optimization
    Replies: 12
    Last Post: December 14th, 2002, 05:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •