Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
  • php update question (In: Coding & Databases - PHP, ASP, Perl, etc.)
  • Featured Web Site Template

    Hundreds More at Free Site Templates.com!

    Web Site Partners
    Sponsored Links
    Jet City Software
     
    Whos Here ?
    There are 0 guests and 1 members in the forums right now.
    Reflects user activity within the last 5 minutes
    Moderator(s): Prowler, jcokos
    Member Message

    karrella
    Joined: Aug 19, 2005
    # Posts: 41

    View the profile for karrella Send karrella a private message

    Posted: 2005-Aug-20 06:47
    Edit Message Delete Message Reply to this message

    I have just redone my entire webpage in PHP to take advantage of having a navigation menu on my page that can be easily updated. I was having trouble with people getting stuck in my frames as well, which is very bad business.

    And so my questions are...

    When I put up all my .php pages, what should I do with all the .html coppies that are currently online?

    What if people linked to them? I don't want to create more dead ends for people, but I don't want tons of redirect pages floating around either.

    I have previously submitted to search engines, will that mess up those links as well?

    Any advice, "this is what I dids" or anything would be awesome!
    Thanks!

    P.S. If you would like to email me for the site link and see the site as it is now and give me any more suggestions that would be great as well! ((email removed))

    [ Message was edited by: bhartzer 08/29/2005 02:12 pm ... Reason: removed email address ]





    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10465

    View the profile for g1smd Send g1smd a private message

    Posted: 2005-Aug-20 19:35
    Edit Message Delete Message Reply to this message

    >> but I don't want tons of redirect pages floating around either. <<

    You would only have a "page" if you used a meta refresh statement on the old page, the old page would have ONLY the meta refresh, no other content at all.

    But you should avoid doing that completely. If you instead set up the redirects as instructions in the .htaccess file, you can get that to take care of the redirect handling and completely delete all of the old pages. Use a 301 redirect from .htm to .php.

    Another alternative is to set up the server so that all pages that end in .htm or .html are treated as PHP pages, but that will slow your server down a little.

    Finally, the long term solution would have been to have every page of the site as an index page in a folder, linking only to the folder name with a trailing / on the end of the URL. Changing the pages from index.html to be index.php would be transparent to all users and bots as a call for http://www.domain.com/folder/ would simply get the server to find the index file - whatever it is actually called - and just serve it.



    karrella
    Joined: Aug 19, 2005
    # Posts: 41

    View the profile for karrella Send karrella a private message

    Posted: 2005-Aug-21 03:24
    Edit Message Delete Message Reply to this message

    Thanks g1smd!
    About your final suggestion, would that work with just the web address and no folder, such as, www.domain.com

    Since its not on my server, do I have access to the .htaccess file? The second suggestion you said does sound like the most productive way to handle this.

    One final question, do you think it was unwise to change the whole site over to php?

    Thanks

    [ Message was edited by: bhartzer 08/29/2005 02:13 pm ]





    karrella
    Joined: Aug 19, 2005
    # Posts: 41

    View the profile for karrella Send karrella a private message

    Posted: 2005-Aug-26 00:04
    Edit Message Delete Message Reply to this message

    Wow that did it for sure!

    I used a 301 redirect and have found a good explaination as well that I will share along with my own.

    First off here is a great link www.tamingthebeast.net/articles3/spiders-301-redirect.htm

    And now for my example, all you have to do is open up notpad or a similar program and make a .txt file called htaccess

    In the file put the following line of code for each page you want to redirect;

    redirect 301 /old/old.htm h**p://www.you.com/new.htm

    Upload the file with your ftp program and rename the file .htaccess

    A few notes: Only use the subdirectory and filename for the old site, you cannot use http://www. on the start it will not work. As well make sure you file online is just called .htaccess with no after extension.

    Hope this helps someone =)

    [ Message was edited by: bhartzer 08/29/2005 02:13 pm ]





    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10465

    View the profile for g1smd Send g1smd a private message

    Posted: 2005-Aug-26 06:44
    Edit Message Delete Message Reply to this message

    There is another way to do it, using just three lines of code to redirect ALL requests using the same pattern, instead of one line per file.



    lizardz
    Joined: Nov 12, 2004
    # Posts: 1394

    View the profile for lizardz Send lizardz a private message

    Posted: 2005-Aug-26 09:51
    Edit Message Delete Message Reply to this message

    Of course, what you should really do is not rename your files at all, which will break all the backlinks to your site, and just add this single line to your .htaccess file:

    AddType application/x-httpd-php .htm .html

    and your .html pages will run as happy as can be in php mode. The alleged slowdown is not visible, I've never seen it, the only times I can see any server lag at all is when the page runs a few pages of scripting before being built, and even then it's pretty much not noticeable. With dual processor 2.6 + gigahertz servers more and more the norm, this type of issue just isn't an issue anymore, hasn't been for a few years at least.



    dirty_shame
    Joined: Aug 28, 2005
    # Posts: 191

    View the profile for dirty_shame Send dirty_shame a private message

    Posted: 2005-Aug-28 09:37
    Edit Message Delete Message Reply to this message

    Add this:

    Sometimes, it helps to put the source in your .htaccess file preceding the statement lizardz recommends. So you might put>

    AddType application/x-httpd-php .php .php3 .php4 .phpz
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .htm .html

    ...if you know where the source file is for your PHP.


    You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
    1. You have not yet logged in, or registered properly as a member
    2. You are a member, but no longer have posting rights.
    3. This is a private forum, for which you do not have permissions.

    If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

    If you cannot find this message, click here to Re-Send it.

    If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

    Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

    New posts Forum is locked
    © 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions