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.
Related Articles Artikel Terkait
- Add Trailing Slash to the End of the URL with .htaccess Rewrite Rules Trailing Slash Tambahkan ke Akhir dari URL dengan. Htaccess Rewrite Aturan
- SEO Friendly Rewrite Method to Move Website URL From Subdirectory to Root Parent Folder Metode Rewrite SEO Friendly untuk Pindahkan Website URL Dari Subdirektori untuk Root Parent Folder
- Uninstall and Remove Multiple Database Instances of Microsoft SQL Server 2005 Uninstall dan Hapus Multiple Instances Database Microsoft SQL Server 2005
- Running Multiple Instances of Windows Live Messenger (WLM) Polygamy and Remove Banner Ads with MultiLive Menjalankan Multiple Instances of Windows Live Messenger (WLM) Poligami dan Hapus Banner Iklan dengan MultiLive
- Redirect Blogger RSS Feed to FeedBurner for Detailed Statistics and Monetize Ads Redirect Blogger RSS Feed to FeedBurner untuk dan Monetize Statistik Detil Iklan
- Seeing Double Wall Clock Melihat Double Wall Clock
- Remove and Uninstall or Disable ModSecurity (mod_security) Hapus dan Uninstall atau Nonaktifkan ModSecurity (mod_security)
- Redirect, Stream and Listen All Audio, Sound and Music from Windows Mobile 5 and 2003 Devices to Bluetooh Headset or Earpiece Redirect, Stream dan Dengar Semua Audio, Sound dan Musik dari Windows Mobile 5 dan 2003 Device untuk Bluetooh Headset atau Lubang suara
- Double Driver Backups and Restores Device Drivers in Simple Steps Double Driver dan Mengembalikan Backup Device Drivers di Simple Steps
- No Sex Interaction In Airbus A380 Double Bed Suites No Sex Interaksi Airbus A380 Dalam Kamar Suite Double Bed










































September 20th, 2009 02:25 20 September 2009 02:25
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!
September 1st, 2009 16:36 September 1, 2009 16:36
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
August 4th, 2009 20:01 4 Agustus 2009 20:01
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 ^ ^
July 22nd, 2009 12:13 22 Juli 2009 12:13
[...] [...] 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 .. . . [...] [...]
July 8th, 2009 16:05 8 Juli 2009 16:05
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"
January 31st, 2009 20:02 31 Januari 2009 20:02
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
August 18th, 2008 03:00 18 Agustus 2008 03:00
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.
July 29th, 2008 19:33 29 Juli 2008 19:33
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