Redirect or Rewrite to Remove Double or Multiple Slashes (//) in URL Redirect atau Rewrite untuk Hapus Double atau Multiple garis miring (/ /) di URL

Google search engine spider or crawler Googlebot is one of the most advanced and finest content grabber that extracts most if not all of any data of the Internet and World Wide Web, regardless of whether such contents or web pages are intended for public visitors. Mesin pencari Google spider atau crawler Googlebot adalah salah satu yang paling maju dan konten terbaik grabber bahwa ekstrak kebanyakan jika tidak semua data apapun dari Internet dan World Wide Web, tanpa memperhatikan apakah isi tersebut atau halaman web yang ditujukan untuk pengunjung umum.

As such, some webmasters may notice that Google is crawling and indexing web pages which are not supposed to be existed in the first place. Dengan demikian, beberapa webmaster mungkin melihat bahwa Google merangkak dan mengindeks halaman web yang tidak seharusnya ada di tempat pertama. One such instance is incorrect and wrong URL link location, such as when double slash, triple slash or multiple forward slashes been formed as part of the URL as extra slash or slashes been appended or added to the web page URLs. Salah satu contoh seperti itu tidak benar dan salah link URL lokasi, seperti ketika dua garis miring, triple slash atau garis miring maju beberapa terbentuk sebagai bagian dari URL sebagai garis miring atau garis miring ekstra telah ditambahkan atau ditambahkan ke URL halaman web. For example, a page with URL of http://www.domain.com/index.php is also been crawled by Google as http://www.domain.com//index.php, or sometimes even http://www.domain.com///index.php. Sebagai contoh, sebuah halaman dengan URL http://www.domain.com/index.php juga telah dijelajahi oleh Google sebagai http://www.domain.com//index.php, atau kadang-kadang bahkan http:// www.domain.com///index.php.

The web crawl and spider indexing by Google can be tracked and traced in Apache or web server access logs. Web merangkak dan laba-laba mengindeks oleh Google dapat dilacak dan ditelusuri di Apache atau web log akses server. And these double slash, triple slash, quadruple or more slash URLs can show up in the Google search results, and potentially can cause duplicate content issue , and worse, penalty that makes the site vanishing from Google search results listing or been pushed into supplemental results with low ranking. Dan ini garis miring ganda, triple slash, empat kali lipat atau lebih slash URL dapat muncul dalam hasil pencarian Google, dan secara potensial dapat menyebabkan masalah konten duplikat, dan lebih parah lagi, hukuman yang membuat situs menghilang dari daftar hasil pencarian Google atau didorong ke dalam hasil tambahan peringkat rendah.

The reason for additional slashes in the URL is unknown, and seems like it only happens on Google search engne. Alasan garis miring tambahan pada URL tidak diketahui, dan tampaknya seperti itu hanya terjadi pada engne pencarian Google. One possibility is visitors or other websites type or put incorrect backlink (external link), which picked up by ultra-sensitive Salah satu kemungkinan adalah pengunjung atau situs-situs lain yang salah ketik atau meletakkan backlink (link eksternal), yang diambil oleh ultra-sensitif Googlebot or Mediapartners-Google Googlebot atau Mediapartners-Google (Google AdSense crawler which also contribute website indexing of Google Search). (Crawler Google AdSense yang juga berkontribusi pengindeksan situs web Google Search). But one thing is for sure – when one page with wrongful double or a few adjacent slashes been indexed, entire web pages within the website may be prone to such error too. Tapi satu hal yang pasti - ketika salah satu halaman dengan dua atau beberapa garis miring yang berdekatan telah diindeks, seluruh halaman web dalam situs web dapat rentan terhadap kesalahan seperti itu juga.

To fix and resolve the double slash or multiple slash URLs issue is pretty simple. Untuk memperbaiki dan menyelesaikan dua garis miring garis miring atau beberapa masalah URL sangat sederhana. Simply create a mod_rewrite directive in .htaccess code or Apache httpd.conf configuration file to rewrite or redirect permanently (status 301) all URL found to be contained two or more adjacent or trailing slashes to its proper and valid URL with just a single slash (/) instead or // or /// or even //// or more within the URL address, create a .htaccess file in the root directory (normally public_html) for the website with the following URL rewriting and redirection directive (if .htaccess already exists, just add in the code on top). Cukup membuat sebuah direktif mod_rewrite. Htaccess kode atau file konfigurasi Apache httpd.conf untuk menulis ulang atau redirect secara permanen (status 301) semua URL yang ditemukan akan berisi dua atau lebih berdekatan atau akhiran garis miring ke URL yang benar dan valid hanya dengan satu garis miring ( /), bukan atau / / atau / / / atau bahkan / / / / atau lebih dalam alamat URL, membuat file. htaccess pada direktori root (biasanya public_html) untuk website dengan URL berikut petunjuk penulisan ulang dan pengarahan ulang (jika. htaccess sudah ada, tambahkan saja di kode di atas).

# Remove multiple slashes anywhere in URL # Hapus beberapa garis miring di mana saja di 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). Pengalihan atau di atas metode penulisan ulang URL akan melewatkan bagian URL lengkap pada bagian setelah nama domain, dan akan berubah setiap bagian dari garis miring ganda untuk satu garis miring (dan dengan demikian mampu menangani lebih dari 2 garis miring di URL juga). For administrators who want to more efficient rewrite command, use the following code, which can only be used on .htaccess file. Bagi administrator yang ingin menulis ulang perintah yang lebih efisien, gunakan kode berikut, yang hanya dapat digunakan pada file. Htaccess.

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

Replace domain name accordingly. Ganti nama domain yang sesuai.

IMPORTANT : The page is machine translated and provided "as is" without warranty. PENTING: Halaman ini adalah mesin diterjemahkan dan diberikan "sebagaimana adanya" tanpa jaminan. Machine translation may be difficult to understand. Terjemahan mesin mungkin sulit untuk mengerti. Please refer to Silakan merujuk ke original English article artikel asli bahasa Inggris whenever possible. bila memungkinkan.


8 Responses to “Redirect or Rewrite to Remove Double or Multiple Slashes (//) in URL” 8 Responses to "Redirect atau Rewrite untuk Hapus Double atau Multiple garis miring (/ /) di URL"

  1. Glen Glen
    September 20th, 2009 02:25 20 September 2009 02:25
    8 8

    Works like a charm. Works like a charm. Was getting some 404 errors in my logs due to extra slashes from referring pages and this fixed it. Apakah mendapatkan beberapa 404 kesalahan dalam log saya garis miring karena tambahan dari halaman dan ini mengacu fixed it.

    Thanks! Terima kasih!

  2. DaKorn DaKorn
    September 1st, 2009 16:36 September 1, 2009 16:36
    7 7

    I think it would make more sense to use some RegExp in the RewriteCond. Saya pikir itu akan membuat lebih masuk akal untuk menggunakan beberapa regexp di RewriteCond.
    So you are not limited to two slashes, it can handle any number bigger than two. Jadi anda tidak terbatas pada dua garis miring, dapat menangani sejumlah besar dari dua.

    RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$ RewriteCond% (REQUEST_URI) ^(.*)/{ 2 ,}(.*)$

    Example: Contoh: http://www,bla.de////bla///bla/index.html http://www, bla.de / / / / bla / / / bla / index.html become menjadi http://www,bla.de/bla/bla/index.html http://www, bla.de / bla / bla / index.html

    bye dudes bye dudes

  3. Mike Mike
    August 4th, 2009 20:01 4 Agustus 2009 20:01
    6 6

    LOL LOL
    I was looking for such an .htaccess rule too, and at the same time reading Tiger SEO's blog. Aku sedang mencari seperti itu. Htaccess aturan juga, dan pada saat yang sama membaca blog Tiger SEO.
    Funny to see him commenting there ^^ Lucu komentar melihatnya di sana ^ ^

  4. Removing Double Slashes From URLs | Gary Harvey Blog Menghapus Double garis miring Dari URL | Gary Harvey Blog
    July 22nd, 2009 12:13 22 Juli 2009 12:13
    5 5

    [...] [...] http://www.mydigitallife.info/2008/07/21/redirect-or-rewrite-to-remove-double-or-multiple-slashes-in.. http://www.mydigitallife.info/2008/07/21/redirect-or-rewrite-to-remove-double-or-multiple-slashes-in .. . . [...] [...]

  5. Manish Manish
    July 8th, 2009 16:05 8 Juli 2009 16:05
    4 4

    Can any one tell me that how can i replace this double slashes to single slash in the following C# snippet. Dapatkah salah satu mengatakan bahwa bagaimana saya bisa menggantikan ganda ini untuk satu garis miring garis miring di bawah ini C # snippet.

    string Path=@”C:\\Temp\\ooops.bak” string Path = @ "C: \ \ Temp \ \ ooops.bak"

  6. CountOcram CountOcram
    January 31st, 2009 20:02 31 Januari 2009 20:02
    3 3

    Hi! Hai! Is there a way to remove a single slash in the end of the URL? Apakah ada cara untuk menghapus satu garis miring di akhir URL? for example, misalnya http://www.example.com/blog/ http://www.example.com/blog/ to untuk http://www.example.com/blog http://www.example.com/blog

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

    I am sorry but this causes trouble with IE 8 web slicing by breaking it, and only works in the root directory. Saya minta maaf, tapi hal ini menyebabkan masalah dengan IE 8 web mengiris dengan melanggar itu, dan hanya bekerja di direktori root.

    All sub directory listings will get triple slashes and expose server side includes, from the new perl hacks available. Semua sub direktori listing akan mendapatkan tiga garis miring dan mengekspos penyertaan sisi server, dari perl baru hacks tersedia.

    Warning: Peringatan

    If you use any password protected logins, do not include this in your htaccess mod rewrite. Jika Anda menggunakan login yang dilindungi password, tidak termasuk dalam hal ini htaccess mod rewrite.

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

    Thanks a lot, a friend ask me how to remove that and we find the solution here Thanks a lot, seorang teman bertanya pada saya bagaimana untuk menghapus hal itu dan kita menemukan solusi di sini )

Leave a Reply 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> Anda dapat menggunakan tag ini: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Berlangganan ke fitur komentar telah dinonaktifkan. To receive notification of latest comments posted, subscribe to Untuk menerima pemberitahuan dari komentar terbaru diposting, untuk berlangganan My Digital Life Comments RSS feed My Digital Life Komentar RSS feed or atau register to receive mendaftar untuk menerima new comments in daily email digest. komentar baru di email digest harian.
Custom Search

New Articles Artikel Baru

Incoming Search Terms for the Article Cari Syarat masuk untuk Artikel

double slash in url slash ganda di url - -- mod_rewrite double slash mod_rewrite slash ganda - -- php remove double slashes php menghapus garis miring ganda - -- Apache2 path info multiple slashes Info jalan apache2 beberapa garis miring - -- akamai redirect double slashes Akamai redirect garis miring ganda - -- apache rewrite remove double slash rewrite apache menghapus garis miring ganda - -- apache redirect www. apache redirect www. DOUBLE FORWARD SLASH FORWARD DOUBLE SLASH - -- c# strips slashes from network address c # strip garis miring dari alamat jaringan - -- double slashes in apache double garis miring di apache - -- double slash apache slash ganda apache - -- http multiple slashes http beberapa garis miring - -- mod rewrite multiple slashes mod rewrite beberapa garis miring - -- path name windows xp double slash nama path windows xp slash ganda - -- php strip first slash from url php strip garis miring pertama dari url - -- removing double slashes c# menghapus garis miring ganda c # - -- remove double slashes apache menghapus garis miring ganda apache - -- replace forward slash c# menggantikan garis miring c # - -- send url through javascript with slash mengirim url melalui javascript dengan slash - -- why is apache removing double slashes mengapa apache menghapus garis miring ganda - -- apache rewrite double slash rewrite apache slash ganda - -- disable redirect htaccess menonaktifkan redirect htaccess - -- double slash on url string slash ganda pada string url - -- fix slash url php memperbaiki slash url php - -- htaccess redirect if wrong url htaccess redirect jika salah url - -- mod_rewrite double trail slashing jejak ganda mod_rewrite menyayat - -- redirect double slash url slash ganda redirect url - -- remove trailing slash URL menghapus spasi URL - -- rewrite two slashes added menulis ulang dua garis miring ditambahkan - -- single slash in url after https satu garis miring di url setelah https - -- triple forward slash in url triple garis miring di url - -- two forward slashes in url dua garis miring maju di url - -- apache rewrite replace part of url menulis ulang apache mengganti bagian dari url - -- Apach double slashes 404 Miring Apach ganda 404 - -- double slash in url htaccess slash ganda di url htaccess - -- friendly url and double slash ramah url dan double slash - -- htaccess 404 url rewrite transaltion 404 htaccess rewrite url transaltion - -- mod_rewrite doppel slash mod_rewrite Doppel slash - -- pass slash in url, javascript melewati garis miring di url, javascript - -- php htaccess remove trial slash htaccess php sidang menghapus garis miring - -- remove double slashes php menghapus garis miring ganda php - -- removing double slash from network path + C# menghapus garis miring ganda dari jaringan jalan + C # - -- strip multiple slashes regex strip garis miring beberapa regex - -- apache2 mod_rewrite replace http width https mod_rewrite apache2 mengganti lebar http https - -- google analytics double slash google analytics slash ganda - -- htaccess remove double slash htaccess menghapus garis miring ganda - -- htaccess remove two slashes htaccess menghapus dua garis miring - -- javascript regular expression remove double slash regular expression javascript menghapus garis miring ganda - -- regex remove multiple instances with single regex menghapus beberapa contoh dengan satu - -- triple slash http redirect redirect http triple slash - -- +perl convert double slash to single slash + perl mengubah garis miring ganda untuk satu garis miring - --