Any PHP based software like WordPress, Mambo, Joomla, Drupal, MODx etc. will serve pages both from http://your-site.com as well as http://your-site.com/index.php . بي. اتش. بى اى على اساس برامج مثل الكلمات مامبو ، Joomla ، دروبال ، modx وما يخدم كل صفحة من http://your-site.com فضلا عن http://your-site.com/index.php. This creates duplicate content for search engines, which may then decide to penalize your site for duplicate content. وهذا يخلق ازدواجيه المحتوى لمحركات البحث ، التي يجوز لها عندئذ ان يقرر معاقبة موقعك لازدواجيه المحتوى. You can safely prevent duplicate content with the following apache code / directive added to your .htaccess file (or in httpd.conf): يمكنك بأمان مع منع تكرار مضمون المدونه التالية اباتشى / التوجيه واضاف الى حسابك. Htaccess الملف (او في httpd.conf) :

RewriteEngine On على rewriteengine
#Redirect plain index.php to home page without index.php # اعادة توجيه سهل index.php الى الصفحه الرئيسية من دون index.php
RewriteCond %{IS_SUBREQ} false Rewritecond ٪ () is_subreq كاذبة
RewriteRule ^/index\.php$ http://blog.taragana.com [R=301,L] ^] [روريترول] / الرقم القياسى ل\. Http://blog.taragana.com بي. اتش. بى دولار [ص = 301 ، ل]

Replace http://blog.taragana.com with the url of your own site. يستعاض عن http://blog.taragana.com مع عنوان موقعك.

What it does is redirect (301 - permanent redirect) all access to /index.php to / ما تقوم به هو اعادة توجيه (301 -- اعادة توجيه الدائم) الوصول الى جميع / index.php ل/
However it does not redirect for internal requests. بيد انها لا تطلب اعادة توجيه للالداخلية. This is very important because when you are fetching http://blog.taragana.com, Apache actually creates an internal redirect to http://blog.taragana.com/index.php وهذا مهم جدا لأنه عندما كنت جلب http://blog.taragana.com ، اباتشي فعلا يخلق داخلي لاعادة توجيه http://blog.taragana.com/index.php

The RewriteCond above ensures that only external accesses (from browsers, search engine bots etc) are only redirected to the canonical url of the site. وقد rewritecond اعلاه ان يضمن الا قبضة الخارجية (من المتصفحات ، محركات بحث Bots الخ) ليست سوى اعادة توجيه الى موقع الكنسي للموقع.

Also it doesn’t redirect requests like this كما انها لا تطلب اعادة توجيه مثل هذا http://blog.taragana.com/index.php/archive/java-application-security-through-static-analysis/ , which contains index.php as part of the url. ، التي تتضمن index.php كجزء من موقع. Only the exact url http://blog.taragana.com/index.php is redirected to http://blog.taragana.com إلا على وجه الدقه موقع http://blog.taragana.com/index.php هو اعادة توجيهها الى http://blog.taragana.com