¹æÇâÀ» ¹Ù²Ù°Å³ª URL¿¡¼­ µÎ ¹è ´Ù¼ö ³»¸®Ä§À» (/) Á¦°ÅÇϱâ À§ÇÏ¿© ´Ù½Ã ¾²½Ê½Ã¿À

Google °Ë»ö ¿£Áø °Å¹Ì ¶Ç´Â Å©·Ñ·¯ Googlebot´Â ±×·± ³»¿ë ¶Ç´Â À¥ ÆäÀÌÁö´Â °øÁß ¹æ¹®ÀÚ¸¦ À§ÇØ ¿¹Á¤µÈ¤¤´Ù´Â °ÍÀ» ±×·¸Áö ¾ÊÀ¸¸é ÀÎÅÍ³Ý ¹× ¿ùµå ¿ÍÀ̵å À¥ÀÇ ¾î¶² ÀÚ·áÀÇ °¡Àå ÃßÃâ¹° ÀüºÎ, °¡Àå Áøº¸µÇ°í °¡Àå Á¤¹ÐÇÑ ¸¸Á·ÇÑ ¿å½É²Ù·¯±âÀÇ °ÍÀÌ´Ù.

µî°ú °°Àº, ¸î¸î À¥¸¶½ºÅÍ´Â Google°¡ ´Ù´Â °ÍÀ» ÁÖÀÇÇÒÁöµµ ¸ð¸£´Ù Æ÷º¹ÇÏ°í ¸ÕÀú Á¸ÀçÇÏ°í °¡Á¤µÇÁö ¾Ê´Â À¥ ÆäÀÌÁö¸¦ »öÀÎÀ» ºÙÀÎ. 1°³ÀÇ ±×·± °æ¿ì´Â ºÎÁ¤È®ÇÏ°í Æ²¸° URL ¿¬°á À§Ä¡¿Í °°Àº ¶§ µÎ ¹è ³»¸®Ä§ 3¹è ³»¸®Ä§ ¶Ç´Â ´Ù¼ö ¾ÕÀ¸·Î ³»¸®Ä§ URLÀÇ ÇÑ ºÎºÐÀ¸·Î Çü¼ºµÇ¾î ¶§¹®¿¡ ¿©ºÐ ³»¸®Ä§ ¶Ç´Â ³»¸®Ä§ Ãß°¡µÇ±â À¥ ÆäÀÌÁö URL¿¡ Ãß°¡ÇØÀ̱â. ¿¹¸¦ µé¸é, http://www.domain.com/index.phpÀÇ URL¸¦ °¡Áø ÆäÀÌÁö´Â ¶ÇÇÑ http://www.domain.com//index.php, ¶Ç´Â http://www.domain.com///index.php ¶§¶§·Î Á¶Â÷·Î Google¿¡ ÀÇÇØ Æ÷º¹µÈ´Ù.

Google ¿¡ÀÇÇÑ À¥ ±â¾î°¡±â ±×¸®°í °Å¹Ì Áö¼ö¿¬µ¿Àº ¾ÆÆÄÄ¡ ¶Ç´Â À¥ ¼­¹ö Á¢±Ù Å볪¹«¿¡¼­ ÃßÀûµÇ°í ÃßÀûµÉ ¼ö ÀÖ´Ù. ±×¸®°í ÀÌ µÎ ¹è ³»¸®Ä§, 3¹è ³»¸®Ä§Àº, 4¹è·Î ÇÑ´Ù ¶Ç´Â ³»¸®Ä§ URL´Â ´õ Google ¼ö»ö °á°ú¿¡¼­ ³ªÅ¸³ª°ñ, ³·Àº ¼øÀ§¸¦ °¡Áø Ãß°¡ °á°ú·Î ¸ñ·ÏÀ¸·Î ¸¸µé°Å³ª ¹Ð¸° Google ¼ö»ö °á°ú¿¡°Ô¼­ »ç¶óÁö´Â À§Ä¡¸¦ ¸¸µå´Â Çü¹ú ÀáÀçÀûÀ¸·Î ÀÌÁß ¸¸Á·ÇÑ ¹®Á¦Á¡À», ´õ ³ª»Û ÀÏÀ¸Å°´Â ¿øÀÎÀÌ µÉ, ¼ö ÀÖ´Ù.

URL¿¡ ÀÖ´Â Ãß°¡ÀûÀÎ ³»¸®Ä§À» À§ÇÑ ÀÌÀ¯´Â Google ¼ö»ö engne¿¡¼­¸¸ ÀϾ´Â ó·³ ºÒ¸íÇÏ, º¸ÀδÙ. 1°³ÀÇ °¡´É¼ºÀº ¹æ¹®ÀÚÀÌ´Ù ¶Ç´Â ´Ù¸¥ À¥»çÀÌÆ®´Â ¸Å¿ì °ú¹ÎÇß´ø¿¡ ÀÇÇÏ¿© ÁÖ¿ö ºÎÁ¤È®ÇÑ backlink (¿ÜºÎ ¿¬°á)¸¦ ŸÀÚ¸¦ Ä¡°Å³ª µÐ´Ù, Googlebot ¶Ç´Â Mediapartners-Google (Google AdSense Å©·Ñ·¯ ¶ÇÇÑ Google ¼ö»öÀÇ À¥»çÀÌÆ® Áö¼ö¿¬µ¿À» °øÇåÇÏ´Â). ±×·¯³ª 1°³ÀÇ °ÍÀº - ºÎ´çÇÑ µÎ ¹è ¾à°£ ÀÎÁ¢ÇÑ ³»¸®Ä§À» °¡Áø 1 ÆäÀÌÁö°¡ À¥»çÀÌÆ® ³»ÀÇ »öÀÎÀÌ ºÙ´Â, Àüü À¥ ÆäÀÌÁö ±×·± °ú½Ç¿¡ ¿ª½Ã ¼ö±×¸±Áöµµ ¸ð¸£´Ù ¶§ È®½ÇÈ÷ ÀÌ´Ù.

µÎ ¹è ³»¸®Ä§ ¶Ç´Â ´Ù¼ö ³»¸®Ä§ URL ¹®Á¦Á¡À» °á½ÉÇÏ´Â °ÍÀº °íÄ¡°í ¸Å¿ì °£´ÜÇÏ´Ù. °£´ÜÇÏ°Ô .htaccess ºÎÈ£¿¡ ÀÖ´Â mod_rewrite Áö½Ã¸¦ âÁ¶Çϰŵç (»óÅ 301) ¸ðµç URL¸¦ ¿µ¿øÇÏ°Ô ´Ù½Ã ¾²°Å³ª ¹æÇâÀ» ¹Ù²Ù´Â ¾ÆÆÄÄ¡ httpd.conf ±¸¼º ÆÄÀÏÀº À¥»çÀÌÆ®¸¦ À§ÇÑ ·çÆ® µð·ºÅ丮 (ÀϹÝÀûÀ¸·Î public_html)¿¡ ÀÖ´Â µÚ¿¡ ¿À´Â URL ´Ù½Ã ¾´ ±×¸®°í ¼ö½ÅÀÎÀÇ »õ ÁÖ¼Ò Áö½Ã·Î ¶Ç´Â // ¶Ç´Â /// ¶Ç´Â //// ¶Ç´Â ´õ ¸¹Àº °Í, âÁ¶ÇÑ´Ù .htaccess ÆÄÀÏÀ» URL ÁÖ¼Ò ³»ÀÇ ´Ù¸¸ ´Ü Çϳª ³»¸®Ä§À» °¡Áø ±×°ÍÀÇ Àû´çÇϰí À¯È¿ÇÑ URL¿¡ 2°³ ÀÌ»ó ÀÎÁ¢ÇÑ ²ô´Â ³»¸®Ä§ (/) ´ë½Å Æ÷ÇԵDZâ À§ÇÏ¿© ã¾Æ³Â´Ù (.htaccess°¡ ÀÌ¹Ì Á¸ÀçÇϰí, ´Ù¸¸ Ãß°¡ÇÏ´Â °æ¿ì¿¡ Á¤»ó¿¡ ºÎÈ£¿¡¼­).

# URL¿¡¼­ ´Ù¼ö ³»¸®Ä§À» ¾î´À °÷¿¡¼­µçÁö Á¦°ÅÇϽʽÿÀ
RewriteCond % {REQUEST_URI} ^ (. *)/(. *) $
RewriteRule. %1/%2 [R=301, L]

The above redirection or URL rewrite method will parse the complete URL section on the part after the domain name, and will change each part of double slash to single slash (and thus able to handle more than 2 slashes in URL too). For administrators who want to more efficient rewrite command, use the following code, which can only be used on .htaccess file.

# Remove multiple slashes after domain
RewriteRule ^/(.*)$ http://www.domain.com/$1 [R=301,L]

Replace domain name accordingly.

IMPORTANT: This is a machine translated page which is provided "as is" without warranty. Machine translation may be difficult to understand. Please refer to original English article whenever possible.

Share and contribute or get technical support and help at My Digital Life Forums.



2 Responses to ¡°Redirect or Rewrite to Remove Double or Multiple Slashes (//) in URL¡±

  1. Tiger SEO
    July 29th, 2008 19:33
    1

    Thanks a lot, a friend ask me how to remove that and we find the solution here :)

  2. jeffb
    August 18th, 2008 03:00
    2

    I am sorry but this causes trouble with IE 8 web slicing by breaking it, and only works in the root directory.

    All sub directory listings will get triple slashes and expose server side includes, from the new perl hacks available.

    Warning:

    If you use any password protected logins, do not include this in your htaccess mod rewrite.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting


Custom Search

New Articles

Incoming Search Terms for the Article

mydigitallife double slash - apache multiple forward slash //// - Rewrite redirect - rewrite double slash - redirect rewrite - redirect remove trailing slash - double slashes in url - duplicate slash in URL remove - mod_rewrite double-slash - htaccess redirect from double directory - htaccess remove double slashes - apache rewrite redirect double slashes - mod_rewrite double slash - multiple url rewrite htaccess - mod rewrite double slash - php strip forward slashes - php remove forward slashes - extra slash in URL - rewrite remove slashes - htaccess redirect slash - double slash in url - forward url with double slash to url with single slash - apache rewrite multiple trailing slashes - htaccess remove slashes - url with more than a slash - htaccess double slashes - mod_rewrite multiple slashes - remove double slashes - Slashes in URL - htaccess remove exe from url - apache redirect strip trailing slash - how to remove the last slash in url using apache - mod rewrite remove double slashes - apache double slash - rewrite remove double slash - php strip multiple slashes - redirect "//" double slash - rewrite address bar - .htaccess redirect multiple pages - duplicate content redirect index.php?a - htaccess Remove trailing slash at the end - php replace double slash with slash - redirect change directory url remove - remove url address on redirect - rewrite / redirect - site:http:// / inurl: Leave a Comment Name : Email : Url: Notify me of followup comments via e-mail - apache2 redirect ends up with two slashes - parsing url for redirect - triple slash - .htaccess remove duplicate slashes -