PDA

View Full Version : ریدایرکت بعضی صفحات به ساب دامنه از طریق htaccess



Moh@mmad
چهارشنبه 21 فروردین 1392, 13:21 عصر
سلام خدمت دوستان

یه سری صفحه در سایتم دارم که به دو صورت دیده میشه در واقع از طریق htaccess لینکها ریرایت میشه

به این صورت که که صفحهmysite.com/modules.php?name=Forums به صورت mysite.com/forums.html هم دیده میشه در واقع برای بهینه سازی موتور های جستجو ریرایت شده.

حالا من صفحات زیادی در سایتم دارم که به همین شکل هستن حالا میخوام این صفحات رو به ساب دامنه سایتم از طریق ریدایرکت 301 منتقل کنم و صفحاتی هم که ریرایت شدن هم منتقل بشن ..

صفحاتی رو که با modules.php شروع شدن رو میتونم ریدایرکت کنم ولی صفحاتی که ریرایت شدن نمیتونم ریدایرکت کنم



لینکها توی فایل htaccess به صورت زیر ریرایت شدن




RewriteRule ^ftopic-([0-9]*)-([0-9]*).html modules.php?name=Forums&file=viewtopic&t=$1&start= $2 [L]
RewriteRule ^ftopic-([0-9]*)-(previous|next).html modules.php?name=Forums&file=viewtopic&t=$1&view=$ 2 [L]
RewriteRule ^ftopic(t|p)-([0-9]*)-([A-Za-z0-9_-]*).html modules.php?name=Forums&file=viewtopic&$1=$2&highl ight=$3 [L]
RewriteRule ^ftopic-([0-9]*)-(watch|unwatch)-([0-9]*).html modules.php?name=Forums&file=viewtopic&t=$1&$2=top ic&start=$3 [L]
RewriteRule ^ftopic(t|p)-([0-9]*).html modules.php?name=Forums&file=viewtopic&$1=$2 [L]
RewriteRule ^ftopic(t|p)-([0-9]*).html#([0-9]*) modules.php?name=Forums&file=viewtopic&$1=$2#$3 [L]
RewriteRule ^forum-editprofile.html modules.php?name=Forums&file=profile&mode=editprof ile [L]
RewriteRule ^forum-userprofile-([0-9]*).html modules.php?name=Forums&file=profile&mode=viewprof ile&u=$1 [L]
RewriteRule ^forum-register-new.html modules.php?name=Forums&file=profile&mode=register &agreed=true [L]
RewriteRule ^forum-register-coppa.html modules.php?name=Forums&file=profile&mode=register &agreed=true&coppa=true
RewriteRule ^forum-register.html modules.php?name=Forums&file=profile&mode=register [L]
RewriteRule ^forums-posting.html modules.php?name=Forums&file=modules&name=Forums&f ile=posting [L]
RewriteRule ^forum-faq-bbcode.html modules.php?name=Forums&file=faq&mode=bbcode [L]
RewriteRule ^ftopic-post-([0-9]*).html modules.php?name=Forums&file=posting&t=$1 [L]
RewriteRule ^ftopic-vote-([0-9]*).html modules.php?name=Forums&file=posting&mode=vote&t=$ 1 [L]
RewriteRule ^ftopic-new-([0-9]*).html modules.php?name=Forums&file=posting&mode=newtopic &f=$1 [L]
RewriteRule ^ftopic-reply-([0-9]*).html modules.php?name=Forums&file=posting&mode=reply&t= $1 [L]
RewriteRule ^ftopic-edit-([0-9]*).html modules.php?name=Forums&file=posting&mode=editpost &p=$1 [L]
RewriteRule ^ftopic-smilies.html modules.php?name=Forums&file=posting&mode=smilies& popup=1 [L]
RewriteRule ^ftopic-quote-([0-9]*).html modules.php?name=Forums&file=posting&mode=quote&p= $1 [L]
RewriteRule ^forum-posting.html modules.php?name=Forums&file=posting [L]
RewriteRule ^forums-group([0-9]*)-start([0-9]*).html modules.php?name=Forums&file=groupcp&g=$1&start=$2 [L]
RewriteRule ^forums-group([0-9]*).html modules.php?name=Forums&file=groupcp&g=$1 [L]
RewriteRule ^forums-groupcp.html modules.php?name=Forums&file=groupcp [L]
RewriteRule ^fsearch-author-([a-zA-Z0-9_-]*).html modules.php?name=Forums&file=search&search_author= $1 [L]
RewriteRule ^fsearch-([0-9]*)-([0-9]*).html modules.php?name=Forums&file=search&search_id=$1&s tart=$2 [L]
RewriteRule ^fsearch-(unanswered|egosearch|newposts).html modules.php?name=Forums&file=search&search_id=$1 [L]
RewriteRule ^fsearch-results.html modules.php?name=Forums&file=search&mode=results [L]
RewriteRule ^forums-([^index][a-zA-Z0-9_-]*).html modules.php?name=Forums&file=$1 [L]
RewriteRule ^forum-c([0-9]*).html modules.php?name=Forums&file=index&c=$1 [L]
RewriteRule ^forum-mark.html modules.php?name=Forums&file=index&mark=forums [L]
RewriteRule ^forums.html modules.php?name=Forums&file=index [L]
RewriteRule ^forum-viewonline.html modules.php?name=Forums&file=viewonline [L]
RewriteRule ^forum-([0-9]*)-days([0-9]*)-([0-9]*).html modules.php?name=Forums&file=viewforum&f=$1&topicd ays=$2&start=$3 [L]
RewriteRule ^forum-([0-9]*)-([0-9]*).html modules.php?name=Forums&file=viewforum&f=$1&start= $2 [L]
RewriteRule ^forum-([0-9]*)-mark.html modules.php?name=Forums&file=viewforum&f=$1&mark=t opics [L]
RewriteRule ^forum-([0-9]*).html modules.php?name=Forums&file=viewforum&f=$1 [L]
RewriteRule ^forums.html modules.php?name=Forums [L]

Moh@mmad
چهارشنبه 21 فروردین 1392, 19:04 عصر
کسی راه حلی نداره ؟؟؟