PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Diriger une société d'hébergement > alt.internet.seo > can you "comment out" in an .htaccess file?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.internet.seo Internet search engines and related topics.

can you "comment out" in an .htaccess file?

Réponse
 
LinkBack Outils de la discussion
Vieux 18/09/2006, 08h16   #1
Big Bill
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut can you "comment out" in an .htaccess file?

I'm just wondering... when I try to remove a link from Google's index
I get refused on the basis of too many redirects, presumably because I
have a custom 404, so I'm wondering if I remove the redirect in the
..htaccess file and then I thought, can I just comment this out, like
you do in an html page or REM in DOS?

BB
--

http://www.crystal-liaison.com/adam-...t-i150456.html
http://www.crystal-liaison.com/all-g...dren/cece.html
http://www.crystal-liaison.com/all-t...-american.html
  Réponse avec citation
Vieux 18/09/2006, 08h19   #2
Els
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: can you "comment out" in an .htaccess file?

Big Bill wrote:

> I'm just wondering... when I try to remove a link from Google's index
> I get refused on the basis of too many redirects, presumably because I
> have a custom 404, so I'm wondering if I remove the redirect in the
> .htaccess file and then I thought, can I just comment this out, like
> you do in an html page or REM in DOS?


Yup:

# this is a comment in
# an .htaccess file
# :-)

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
  Réponse avec citation
Vieux 18/09/2006, 13h21   #3
Big Bill
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: can you "comment out" in an .htaccess file?

On Mon, 18 Sep 2006 09:19:21 +0200, Els <els.aNOSPAM@tiscali.nl>
wrote:

>Big Bill wrote:
>
>> I'm just wondering... when I try to remove a link from Google's index
>> I get refused on the basis of too many redirects, presumably because I
>> have a custom 404, so I'm wondering if I remove the redirect in the
>> .htaccess file and then I thought, can I just comment this out, like
>> you do in an html page or REM in DOS?

>
>Yup:
>
># this is a comment in
># an .htaccess file
># :-)


Thanks Els. No need for a closing tag?

BB
--

http://www.crystal-liaison.com/adam-...t-i150456.html
http://www.crystal-liaison.com/all-g...dren/cece.html
http://www.crystal-liaison.com/all-t...-american.html
  Réponse avec citation
Vieux 18/09/2006, 13h33   #4
Els
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: can you "comment out" in an .htaccess file?

Big Bill wrote:

> On Mon, 18 Sep 2006 09:19:21 +0200, Els <els.aNOSPAM@tiscali.nl>
> wrote:
>
>>Big Bill wrote:
>>
>>> I'm just wondering... when I try to remove a link from Google's index
>>> I get refused on the basis of too many redirects, presumably because I
>>> have a custom 404, so I'm wondering if I remove the redirect in the
>>> .htaccess file and then I thought, can I just comment this out, like
>>> you do in an html page or REM in DOS?

>>
>>Yup:
>>
>># this is a comment in
>># an .htaccess file
>># :-)

>
> Thanks Els. No need for a closing tag?


# Nope ;-)

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

Now playing: Daniela Mercury - Dona Canô
  Réponse avec citation
Vieux 18/09/2006, 19h44   #5
z
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: can you "comment out" in an .htaccess file?

Big Bill wrote:

> I'm just wondering... when I try to remove a link from Google's index
> I get refused on the basis of too many redirects, presumably because I
> have a custom 404, so I'm wondering if I remove the redirect in the
> .htaccess file and then I thought, can I just comment this out, like
> you do in an html page or REM in DOS?



Is your custom 404 page sending a "404 Not Found" header? If a page is not
sending a "404 Not Found" header Google will not remove the URL with the
URL removal tool. It shouldn't matter whether it is a custom 404 page or
not as long as it sends the right header.

You can download the livehttpheaders extension for Firefox to check what
kinds of headers a page is sending.

You can send the 404 header with some PHP. There's a trick though -- PHP
sometimes will send an incorrect "404 Ok" header, which requires different
syntax to fix. I can look for the snippet if you need it.


  Réponse avec citation
Vieux 18/09/2006, 19h52   #6
z
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: can you "comment out" in an .htaccess file?

Found the snippet:

If PHP as Apache module:

<?php
header("HTTP/1.0 404 Not Found");
?>

If PHP as CGI:

<?php
header("Status: 404 Not Found");
?>

See also http://us2.php.net/manual/en/function.header.php#66254

  Réponse avec citation
Vieux 18/09/2006, 20h06   #7
Big Bill
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: can you "comment out" in an .htaccess file?

On Mon, 18 Sep 2006 14:44:16 -0400, z <nospam@no.invalid> wrote:

>Big Bill wrote:
>
>> I'm just wondering... when I try to remove a link from Google's index
>> I get refused on the basis of too many redirects, presumably because I
>> have a custom 404, so I'm wondering if I remove the redirect in the
>> .htaccess file and then I thought, can I just comment this out, like
>> you do in an html page or REM in DOS?

>
>
>Is your custom 404 page sending a "404 Not Found" header? If a page is not
>sending a "404 Not Found" header Google will not remove the URL with the
>URL removal tool. It shouldn't matter whether it is a custom 404 page or
>not as long as it sends the right header.
>
>You can download the livehttpheaders extension for Firefox to check what
>kinds of headers a page is sending.
>
>You can send the 404 header with some PHP. There's a trick though -- PHP
>sometimes will send an incorrect "404 Ok" header, which requires different
>syntax to fix. I can look for the snippet if you need it.
>


I commented the line out in the .htaccess file so I'll try again with
the url removal tool in a couple hours.

BB
--

http://www.crystal-liaison.com/adam-...t-i150456.html
http://www.crystal-liaison.com/all-g...dren/cece.html
http://www.crystal-liaison.com/all-t...-american.html
  Réponse avec citation
Vieux 18/09/2006, 20h06   #8
Big Bill
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: can you "comment out" in an .htaccess file?

On Mon, 18 Sep 2006 14:52:35 -0400, z <nospam@no.invalid> wrote:

>Found the snippet:
>
>If PHP as Apache module:
>
><?php
> header("HTTP/1.0 404 Not Found");
>?>
>
>If PHP as CGI:
>
><?php
> header("Status: 404 Not Found");
>?>
>
>See also http://us2.php.net/manual/en/function.header.php#66254


Thanks, but it ain't php!

BB
--

http://www.crystal-liaison.com/adam-...t-i150456.html
http://www.crystal-liaison.com/all-g...dren/cece.html
http://www.crystal-liaison.com/all-t...-american.html
  Réponse avec citation
Vieux 18/09/2006, 20h10   #9
z
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: can you "comment out" in an .htaccess file?

Big Bill wrote:

> On Mon, 18 Sep 2006 14:52:35 -0400, z <nospam@no.invalid> wrote:
>
>>Found the snippet:
>>
>>If PHP as Apache module:
>>
>><?php
>> header("HTTP/1.0 404 Not Found");
>>?>
>>
>>If PHP as CGI:
>>
>><?php
>> header("Status: 404 Not Found");
>>?>
>>
>>See also http://us2.php.net/manual/en/function.header.php#66254

>
> Thanks, but it ain't php!


If it's running on Apache, you can get it to execute PHP in any kind of file
(as far as I know, although I've only done it with .html and .htm files).


  Réponse avec citation
Vieux 19/09/2006, 00h50   #10
Big Bill
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: can you "comment out" in an .htaccess file?

On Mon, 18 Sep 2006 19:06:39 GMT, Big Bill <kruse@cityscape.co.uk>
wrote:

>On Mon, 18 Sep 2006 14:44:16 -0400, z <nospam@no.invalid> wrote:
>
>>Big Bill wrote:
>>
>>> I'm just wondering... when I try to remove a link from Google's index
>>> I get refused on the basis of too many redirects, presumably because I
>>> have a custom 404, so I'm wondering if I remove the redirect in the
>>> .htaccess file and then I thought, can I just comment this out, like
>>> you do in an html page or REM in DOS?

>>
>>
>>Is your custom 404 page sending a "404 Not Found" header? If a page is not
>>sending a "404 Not Found" header Google will not remove the URL with the
>>URL removal tool. It shouldn't matter whether it is a custom 404 page or
>>not as long as it sends the right header.
>>
>>You can download the livehttpheaders extension for Firefox to check what
>>kinds of headers a page is sending.
>>
>>You can send the 404 header with some PHP. There's a trick though -- PHP
>>sometimes will send an incorrect "404 Ok" header, which requires different
>>syntax to fix. I can look for the snippet if you need it.
>>

>
>I commented the line out in the .htaccess file so I'll try again with
>the url removal tool in a couple hours.
>
>BB


And I did, and it seems to have worked. The request didn't get the
usual denial. It seems to be underway. Let's wait and see.

BB
--

http://www.crystal-liaison.com/adam-...t-i150456.html
http://www.crystal-liaison.com/all-g...dren/cece.html
http://www.crystal-liaison.com/all-t...-american.html
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h47.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15894 seconds with 18 queries