Welcome to WebmasterWorld Guest from 54.198.222.129

Message Too Old, No Replies

Unwanted URL Indexing - both .php and .html URLs

     
10:59 am on May 15, 2012 (gmt 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)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 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
4:28 am on Jun 7, 2012 (gmt 0)

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 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.
1:59 pm on Jun 7, 2012 (gmt 0)

WebmasterWorld Senior Member planet13 is a WebmasterWorld Top Contributor of All Time 5+ 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.
2:51 pm on Jun 7, 2012 (gmt 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 Jun 7, 2012 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 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?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month