تحديث آخر نسخة 1.8.37

تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
تجنب المحتوى المكرر بإستخدام الـ mod_rewrite الدرس "2"
#22
تمام اخى. لا تتعجل باليأس..
جرب التالى
كود :
RewriteEngine on
RewriteBase /ms
RewriteCond %{HTTP_HOST} !^www.msat4u.com
RewriteRule (.*) http://www.msat4u.com/$1 [R=301,L]  RewriteCond %{HTTP_HOST} ^msat4u.com$
RewriteRule ^index.html$ index.php [L,NE]
RewriteRule ^(.*)t-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L]
RewriteRule ^(.*)t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)f-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)f-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7 [L]
RewriteRule ^(.*)a-([0-9]+).html$ announcements.php?aid=$2 [L]
RewriteRule ^(.*)thread-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L]
RewriteRule ^(.*)thread-([0-9]+)-page-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)forum-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)forum-([0-9]+)-page-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)forum-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-page-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7 [L]
RewriteRule ^(.*)a-([0-9]+).html$ announcements.php?aid=$2 [L]

او التالى

كود :
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.msat4u.com
RewriteRule (.*) http://www.msat4u.com/$1 [R=301,L]  RewriteCond %{HTTP_HOST} ^msat4u.com$
RewriteBase /ms
RewriteRule ^index.html$ index.php [L,NE]
RewriteRule ^(.*)t-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L]
RewriteRule ^(.*)t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)f-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)f-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7 [L]
RewriteRule ^(.*)a-([0-9]+).html$ announcements.php?aid=$2 [L]
RewriteRule ^(.*)thread-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L]
RewriteRule ^(.*)thread-([0-9]+)-page-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)forum-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L]
RewriteRule ^(.*)forum-([0-9]+)-page-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&page=$3 [QSA,L]
RewriteRule ^(.*)forum-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-page-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7 [L]
RewriteRule ^(.*)a-([0-9]+).html$ announcements.php?aid=$2 [L]
الرد
شكر من طرف :


الردود في هذا الموضوع
Re: تجنب المحتوى المكرر بإستخدام الـ mod_rewrite الدرس "2" - بواسطة Pepo - 2008-04-22, 03:39 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 14 ) ضيف كريم