فضائيات| مكتبة الدريم بوكس | مركز رفع الصور | فضائيات نيوز
تعليم الفوتوشوب


العودة   الإبداع الفضائي > > >

تقنية محركات البحث والـ SEO الكسا - أليكسا - سيو - ارشفة - اشهار - نشر - جوجل - ياهو - محرك - تقنية - مواقع - بحث - فيبسيو rss - xml - seo - google- alexa - Linking In - backlink - Page Rank - yahoo - msn - search - vBSEO Sitemap - vBSEO

شرح تحويل الروابط من php الى html

أقدم لكم شرح تحويل الروابط من php الى html اعمل ملف جديد تحت اسم : htaccess. وضع فيه الكود التالي $ search.php?do=getdaily RewriteRule ^getdaily(+).html$ search.php?do=getdaily&f=$1 RewriteRule

 
LinkBack أدوات الموضوع
  #1  
الصورة الرمزية Sat 2010
I ♥ JoRdan

 


B18 شرح تحويل الروابط من php الى html

شرح تحويل الروابط من php الى html
شرح تحويل الروابط من php الى html


أقدم لكم

شرح تحويل الروابط من php الى html

اعمل ملف جديد تحت اسم : htaccess.

وضع فيه الكود التالي

كود PHP:
search.php?do=getdaily [L]
RewriteRule ^getdaily([0-9]+).htmlsearch.php?do=getdaily&f=$[L]
RewriteRule ^unanswered.htmlsearch.php?do=process&replyless=1&replylimit=0&dontcache=1     [L]
RewriteRule ^unanswered([0-9]+).htmlsearch.php?do=process&replyless=1&replylimit=0&dontcache=1&forumchoice=$1&childforums=[L]
RewriteRule ^forum([0-9]+).html$        forumdisplay.php?f=$1         [L]
RewriteRule ^forum([0-9]+)-([0-9]+)-([a-z]+)-(.*)-([0-9]+)-(.*).htmlforumdisplay.php?f=$1&page=$2&sort=$3&order=$4&pp=$5&daysprune=$[L]
RewriteRule ^forum([0-9]+)-(.*)-([a-z]+)-([a-z]+).html$    forumdisplay.php?f=$1&daysprune=$2&order=$3&sort=$4     [L]
RewriteRule ^announcement([0-9]+).html$     announcement.php?f=$1     [L]
RewriteRule ^announcement([0-9]+)-([0-9]+).html$    announcement.php?f=$1&announcementid=$[L]
RewriteRule ^thread([0-9]+).html$     showthread.php?t=$1     [L]
RewriteRule ^thread([0-9]+)-([0-9]+).html$    showthread.php?t=$1&page=$2     [L]
RewriteRule ^getnew.htmlsearch.php?do=getnew [L]
RewriteRule ^getnew([0-9]+).htmlsearch.php?do=getnew&f=$[L]
RewriteRule ^printthread([0-9]+).html$    printthread.php?t=$1     [L]
RewriteRule ^sendthread([0-9]+).html$    sendmessage.php?do=sendtofriend&t=$[L]
RewriteRule ^referthread([0-9]+)-([0-9]+).htmlshowthread.php?t=$1&referrerid=$2    [L]
RewriteRule ^lastpostinthread([0-9]+).htmlshowthread.php?goto=lastpost&t=$[L]
RewriteRule ^newpostinthread([0-9]+).htmlshowthread.php?goto=newpost&t=$[L]
RewriteRule ^nextnewesttothread([0-9]+).html$    showthread.php?t=$1&goto=nextnewest    [L]
RewriteRule ^nextoldesttothread([0-9]+).html$    showthread.php?t=$1&goto=nextoldest    [L]
RewriteRule ^post([0-9]+).html$     showthread.php?p=$1     [L]
RewriteRule ^post([0-9]+)-([0-9]+).html$    showpost.php?p=$1&postcount=$2    [L]
RewriteRule ^post([0-9]+)-([0-9]+)-([0-9]+).htmlshowthread.php?p=$1&page=$2&pp=$3    [L]
RewriteRule ^thread([0-9]+)-([a-z]+).htmlshowthread.php?mode=$2&t=$1    [L]
RewriteRule ^post([0-9]+)-([a-z]+).htmlshowthread.php?p=$1&mode=$2    [L

داخل مجلد includes ابحث عن ملف إسمه functions.php
وابحث بداخلة عن :-
كود PHP:
print_output($vartext$sendheader 1)
{
global 
$pagestarttime$query_count$querytime$DB_site$bbuserinfo;
global 
$vbphrase$vboptions$stylevar$_REQUEST

اضف اسفله مباشرة
كود PHP:
// do Dani's SEO optimization
global $session;

$search_array = array(
'#<a ([^>]*)href' preg_quote("=\"forumdisplay.php?$session[sessionurl]f=") . '([0-9]+)' preg_quote("&page=") . '([0-9]+)' preg_quote("&sort=") . '([a-z]*)' preg_quote("&order="). '([a-z]*)' preg_quote("&pp=") . '([0-9]*)' preg_quote("&daysprune="). '([^"]*)"#',
'#<a ([^>]*)href' preg_quote("=\"forumdisplay.php?$session[sessionurl]f=") . '([0-9]+)' preg_quote("&daysprune=") . '([^"]*)' preg_quote("&order=") . '([a-z]*)' preg_quote("&sort=") . '([a-z]*)' preg_quote("&pp=") . '([0-9]*)' preg_quote("&page=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"forumdisplay.php?$session[sessionurl]f=") . '([0-9]+)' preg_quote("&daysprune=") . '([^"^&]*)' preg_quote("&order=") . '([a-z]*)' preg_quote("&sort=") . '([a-z]*)"#',
'#<a ([^>]*)href' preg_quote("=\"forumdisplay.php?$session[sessionurl]f=") . '([0-9]+)' preg_quote("&daysprune="). '([^"^&]*)"#',
'#<a ([^>]*)href' preg_quote("=\"forumdisplay.php?$session[sessionurl]f=") . '([0-9]+)' preg_quote("&page=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"forumdisplay.php?$session[sessionurl]f=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]t=") . '([0-9]+)' preg_quote("&page=") . '([0-9]*)' preg_quote("&pp=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]t=") . '([0-9]+)' preg_quote("&page=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]t=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]goto=lastpost&t=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]goto=newpost&t=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"printthread.php?$session[sessionurl]t=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"sendmessage.php?$session[sessionurl]do=sendtofriend&t=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]t=") . '([0-9]+)' preg_quote("&goto=next"). '([a-z]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]p=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]p=") . '([0-9]+)' preg_quote("&page=") . '([0-9]+)' preg_quote("&pp=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showpost.php?$session[sessionurl]p=") . '([0-9]+)' preg_quote("&postcount=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]mode=") . '([a-z]+)' preg_quote("&t=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"showthread.php?$session[sessionurl]p=") . '([0-9]+)' preg_quote("&mode=") . '([a-z]+)\##',

'#<a ([^>]*)href' preg_quote("=\"announcement.php?$session[sessionurl]f=") . '([0-9]+)' preg_quote("&announcementid=") . '([0-9]+)"#',
'#<a ([^>]*)href' preg_quote("=\"announcement.php?$session[sessionurl]f=") . '([0-9]+)"#',

// sanitizing
'#<a ([^>]*)href\=\"([^"]*)&page=([^"]*).html"#',
'#<a ([^>]*)href\=\"([^"]*)&highlight=([^"]*).html"#',

// other
'#<a ([^>]*)href' preg_quote("=\"search.php?$session[sessionurl]do=getdaily&f=") . '([0-9]*)"#',
'#<a ([^>]*)href' preg_quote("=\"search.php?$session[sessionurl]do=getdaily") . '"#',
'#<a ([^>]*)href' preg_quote("=\"search.php?$session[sessionurl]do=process&replyless=1&replylimit=0&dontcache=1&forumchoice=&childforums=1") . '"#',
'#<a ([^>]*)href' preg_quote("=\"search.php?$session[sessionurl]do=process&replyless=1&replylimit=0&dontcache=1&forumchoice=") . '([0-9]+)' preg_quote("&childforums=1") . '"#'

);
$replace_array = array(
'<a \1href="forum\2-\3-\4-\5-\6-\7.html"',
'<a \1href="forum\2-\7-\5-\4-\6-\3.html"',
'<a \1href="forum\2-\3-\4-\5.html"',
'<a \1href="forum\2-\3.html"',
'<a \1href="forum\2-\3.html"',
'<a \1href="forum\2.html"',
'<a \1href="thread\2-\3.html"',
'<a \1href="thread\2-\3.html"',
'<a \1href="thread\2.html"',
'<a \1href="lastpostinthread\2.html"',
'<a \1href="newpostinthread\2.html"',
'<a \1href="printthread\2.html"',
'<a \1href="sendthread\2.html"',
'<a \1href="next\3tothread\2.html"',
'<a \1href="post\2.html"',
'<a \1href="post\2-\3-\4.html"',
'<a \1href="post\2-\3.html"',
'<a \1href="thread\3-\2.html"',
'<a \1href="post\2-\3.html#',

'<a \1href="announcement\2-\3.html"',
'<a \1href="announcement\2.html"',

// sanitizing
'<a \1href="\2-\3.html"',
'<a \1href="\2-\3.html"',

// other
'<a \1href="getdaily\2.html"',
'<a \1href="getdaily.html"',
'<a \1href="unanswered.html"',
'<a \1href="unanswered\2.html"'

);
$vartext preg_replace($search_array$replace_array$vartext); 



مقالات ممكن أن تعجبك :




من مواضيعى في فضائيات مركز يحيى الرياطي للديزل لبيع و صيانة جميع انواع طرمبات وبخاخات الديزل
الحكمة من قراءة سورة الكهف يوم الجمعة فلنداوم على قراءتها كل جمعة
تغريدات عن سورة الكهف , اجمل ماقيل في سورة الكهف
رسائل الجمعة عن سورة الكهف , تذكير بقراءة سورة الكهف
شعر عن الصديق الصادق , بوستات عن الصديق الحقيقي الوفي
صور على اﻷخت الوسطة , صور معبرة عن حنان الأخت
  رقم المشاركة : [2]
كبار الشخصيات
 

افتراضي

الله لايحرمنا من جديدك أســــتاذنا
لك منى كل التقدير وألإحتـــرام
تحــــياتي






من مواضيعى في فضائيات enigma2-plugin-extensions-dflash_0.20_mipsel
3.0 Release DM800se
•• أحدث إصدار نسخة أصلية Release 3.0-dm500HD_Date: 20101111
•• أحدث إصدار نسخة أصلية DM7025 RELEASE 3.0.0 20101111
•• أحدث إصدار نسخة أصلية DM8000- Release 3.0 -20101111
Release-DM 800-3.0
•ADD• غير متواجد حالياً  

الكلمات الدلالية
, , ,

شرح تحويل الروابط من php الى html


أدوات الموضوع


الساعة معتمدة بتوقيت جرينتش +3 . الساعة الآن » 14:10.
Powered by vBulletin
.Copyright ©2000 - 2024, Jelsoft Enterprises Ltd

تابعنا على الفيس بوك جديد مواضيع المنتدى تابعنا على تويتر
DMCA.com Protection Status