Jump to content

renaming HTML to PHP.. after advertising.. bad idea?


werepairitall

Recommended Posts

We have a website with around 1k pages inside it. They all end in .html..

 

We spent about a year marketing and advertising specific pages of our website all over the net.

 

We are in a process of updating our website, and wish to implement blogs(wordpress) and other useful tools like comments, ratings, etc..

 

 

Many of these scripts(widgets) require that the page end in .php in order to make these scripts work.

 

I am trying to keep everything consistent to our advertisement. 

 

 

My question is, is it possible to rename all .HTML files to .PHP and still keep the advertising links? Without having to go to all of our advertising pages and change links..?

 

If so, what would this process be called.. I heard of sync linking and meta refresh, but not sure if this is what we need.

If all the links follow a defined pattern that you can generate a regex for, then you can use mod_rewrite to redirect them. Eg:

RewriteEngine On

RewriteRule /page/(.*)\.html /page/$1.php [R=301,L]
If there is no defined pattern, you can just take the individual URLs and redirect them using the Redirect directive.

Redirect permanent /page/whatever.html http://www.example.com/page/whatever.php
Redirect permanent /someotherpage/blah.html http://www.example.com/someotherpage/blah.php
These would go in your .htaccess or apache config file. If your using a server other than apache, you'll need to research how that server handles redirecting.

No sure what you mean by 'defined pattern'. But I will explain what I mean.

 

I have a link to my website http://www.angelgaragedoors.com/services/garage-door-repair-arcadia.html which I have posted on craigslist.

 

If I rename the file extension in my hosting account to .php, what would be the best way to go around this so visitors will not get a 404 error? I have over 1000 service pages like this which are advertised all over..

 

I have .htaccess on my hosting (godaddy)

By defined pattern, I mean there is something common to all URLs which can be used to match them. For example, if they all begin with /services/ and end in .html with only the middle bit changing then you could match all of them using the regex: /services/(.*)\.html. You can then use that pattern in the mod_rewrite solution described above.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.