Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Unwanted URL Indexing - both .php and .html URLs

         

seochandan

10:59 am on May 15, 2012 (gmt 0)

10+ Year Member



Hello Every one, I am working on a website that has both html and php pages, but currently we concentrate on php pages.

The HTML pages need to redirect to the PHP version but the issue is about a hosting provider problem in .htaccess

I would like to know is there any alternate way to remove(redirect) html page to php. Additionally: these html page have some good amount of traffic.

[edited by: tedster at 11:26 am (utc) on May 15, 2012]
[edit reason] no personal URLs please [/edit]

tedster

11:33 am on May 15, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure what your .htaccess restrictions are, but there are several approaches to allow you to parse the html files through the php interpeter - and then you don't need to use both extensions. However, you do still need to use an .htaccess file.

For example, see: [webmasterworld.com...] Parsing HTML as PHP

Robert Charlton

4:28 am on Jun 7, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



It may be that the site needs a new hosting provider, perhaps not easily done where you are located... but probably the only way you're be able to control various aspects of the site that need controlling.

Planet13

1:59 pm on Jun 7, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It may be that the site needs a new hosting provider...


I agree 100% with this.

If this is a BUSINESS, then you should treat it like a business.

rlange

2:51 pm on Jun 7, 2012 (gmt 0)

10+ Year Member



What about adding a canonical link to the
<head>
of the HTML pages?

<!-- in /somepage.html -->
<link rel="canonical" href="http://www.example.com/somepage.php"/>

--
Ryan

lucy24

6:18 pm on Jun 7, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The HTML pages need to redirect to the PHP version but the issue is about a hosting provider problem in .htaccess

It helps to be concrete. Are you saying that

#1 your host won't let you put rewrites or redirects into htaccess? (Technically, you can add them to your heart's content, but if the AllowOverrides directive in the config file doesn't oblige, the htaccess is simply ignored.)

#2 you have html and php versions of the identical page?