Results 1 to 6 of 6
  1. #1
    Sgt. Joe Friday frank3iii's Avatar
    Join Date
    January 18th, 2005
    Posts
    441
    I am in the process of making major changes in part of my mall site. I hit upon a small submerged stump.

    I want to change over to php, but don't want to lose my traffic and pr.

    I am wondering if you can use the * as a wildcard in the .htaccess file. What I have in mind is something like this:

    Redirect /shops/*.html http://mysite.com/shops/*.php

    If that worked then all of my traffic to the old pages would be redirected to the new php pages.

    Anyone know if this would work? I'm reluctant to just put it in the .htaccess on blind faith.

    Frank
    "Just the facts, Ma'am." Sgt. Joe Friday, Dragnet

  2. #2
    Newbie
    Join Date
    January 18th, 2005
    Posts
    13
    Frank,

    Try adding this to your .htaccess file:

    <pre class="ip-ubbcode-code-pre">RewriteEngine on
    RewriteBase /shops/
    RewriteRule ^(.*).html$ $1.php</pre>
    Hope this helps,

    Jason Weinstein
    http://www.MaximumEdge.com/

  3. #3
    ABW Veteran Student Heyder's Avatar
    Join Date
    January 18th, 2005
    Posts
    5,482
    You can make the server parse the .html extension.

  4. #4
    Sgt. Joe Friday frank3iii's Avatar
    Join Date
    January 18th, 2005
    Posts
    441
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Heyder:
    You can make the server parse the .html extension. <HR></BLOCKQUOTE>

    So, you mean just go ahead and change it to /shops/widgets.php?

    Won't I have a bunch of 404 errors when Google sends folks to widgets.html?

    I must be more dense than usual today.

    Frank
    "Just the facts, Ma'am." Sgt. Joe Friday, Dragnet

  5. #5
    Newbie
    Join Date
    January 18th, 2005
    Posts
    13
    I think what Heyder means is to add the following line to your .htaccess file:

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

    This will allow the server to process files ending in .html as if they were PHP files. This means that you will be able to name your PHP files with a .html extension.

    Have a nice day,

    Jason Weinstein
    http://www.MaximumEdge.com/

  6. #6
    Sgt. Joe Friday frank3iii's Avatar
    Join Date
    January 18th, 2005
    Posts
    441
    Thanks for your replies.

    I need to re-think the wording on my original question.

    Frank
    "Just the facts, Ma'am." Sgt. Joe Friday, Dragnet

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Help With - PHP REDIRECT
    By AddHandler in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: March 25th, 2005, 04:43 PM
  2. How to Do an HTML Redirect Without Bad Consequences
    By Cheesehead in forum Search Engine Optimization
    Replies: 4
    Last Post: November 21st, 2004, 11:59 PM
  3. Redirect html to php--2
    By frank3iii in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: July 20th, 2004, 04:05 PM
  4. Redirect Preference: javascript or html?
    By tomslickaff in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: July 19th, 2004, 06:20 PM
  5. 301 redirect: from dynamic to static html
    By istvan in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: July 19th, 2004, 04:07 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
  •