Welcome to WebmasterWorld Guest from 107.22.87.145

Forum Moderators: Robert Charlton & aakk9999 & andy langton & goodroi

Message Too Old, No Replies

Unwanted URL Indexing - both .php and .html URLs

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

New User

joined:Feb 22, 2012
posts: 15
votes: 0


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]

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

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


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
4:28 am on June 7, 2012 (gmt 0)

Moderator This Forum from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
posts:11529
votes: 227


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.
1:59 pm on June 7, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member planet13 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:June 16, 2010
posts: 3813
votes: 29


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.
2:51 pm on June 7, 2012 (gmt 0)

Full Member

5+ Year Member

joined:Mar 22, 2011
posts:339
votes: 0


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
6:18 pm on June 7, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:13210
votes: 347


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?