-
September 9th, 2013, 18:28
#1
mod_rewrite
سلام
وقتی من کد زیر رو در اچ تی اکسس میزارم سرور ارور میده ببینید : (ارور 500)
5219_9269d1378214716sshot.png
که مشکل باید از mod_rewrite باشه یعنی mod_rewrite
غیر فعال هستش . چطور تو سرور ویندوز 2003 این قسمت (mod_rewrite
)رو فعال کنم ؟ (از ومپ سرور استفاده میکنم .)
کد PHP:
# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On
# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]
RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap|api\.php)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]
-
-
September 9th, 2013 18:28
# ADS
-
September 9th, 2013, 18:48
#2
عضو انجمن
پاسخ : mod_rewrite
سلام
ارور ۵۰۰ لزوما به این معنا نیست که mod_rewrite فعال نیست و ...
به جای yourdomain.com باید نام دامنه خودتون رو بنویسید!
شما اون قسمت ریدایرکت کردن به حالت با www رو فعلا حذف کنید
برای وی بی سئو هم کلا این رول ها رو کپی کن تو فایل .htaccess
کد PHP:
RewriteEngine On
RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap|api\.php)RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/RewriteRule ^(.+)$ vbseo.php [L,QSA]
ویرایش توسط compiler : September 9th, 2013 در ساعت 19:17
-
تعداد تشکر ها از compiler به دلیل پست مفید
-
September 9th, 2013, 19:52
#3
پاسخ : mod_rewrite
-
تعداد تشکر ها از arDEmbOt به دلیل پست مفید
-
September 9th, 2013, 19:54
#4
پاسخ : mod_rewrite

نوشته اصلی توسط
compiler
سلام
ارور ۵۰۰ لزوما به این معنا نیست که mod_rewrite فعال نیست و ...
به جای
yourdomain.com باید نام دامنه خودتون رو بنویسید!
شما اون قسمت ریدایرکت کردن به حالت با www رو فعلا حذف کنید
برای وی بی سئو هم کلا این رول ها رو کپی کن تو فایل .htaccess
کد PHP:
RewriteEngine On
RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap|api\.php)RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/RewriteRule ^(.+)$ vbseo.php [L,QSA]
بنده تمامی این کار ها رو انجام ددم ولی نشده .
-
-
September 9th, 2013, 21:36
#5
پاسخ : mod_rewrite

نوشته اصلی توسط
arDEmbOt
ممنونم
میشه این قسمت رو بیشتر توضیح بدید ؟
کد PHP:
3) Find the line with DocumentRoot “C:/path/to/my/root”, There you will find contents like
<Directory>
</Directory>
Make sure the content inside these two braces looks like
<Directory>
Options All
AllowOverride All
</Directory>
4) All done now restart the Apache server and you will be all good to go
-
-
September 9th, 2013, 21:44
#6
پاسخ : mod_rewrite

نوشته اصلی توسط
GrOup
ممنونم
میشه این قسمت رو بیشتر توضیح بدید ؟
کد PHP:
3) Find the line with DocumentRoot “C:/path/to/my/root”, There you will find contents like
<Directory>
</Directory>
Make sure the content inside these two braces looks like
<Directory>
Options All
AllowOverride All
</Directory>
4) All done now restart the Apache server and you will be all good to go
در فایل httpd.conf دنبال خط می گردین که با DocumentRoot شروع شده است و اون تغییری که در Directory گفته را اعمال می کنید
-
تعداد تشکر ها از arDEmbOt به دلیل پست مفید
-
September 9th, 2013, 21:52
#7
پاسخ : mod_rewrite

نوشته اصلی توسط
arDEmbOt
در فایل httpd.conf دنبال خط می گردین که با DocumentRoot شروع شده است و اون تغییری که در Directory گفته را اعمال می کنید
به این شکل صحیح هست ؟
کد PHP:
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "e:/wamp/www/">
Options All
AllowOverride All
</Directory>
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
-
-
September 10th, 2013, 12:27
#8
پاسخ : mod_rewrite
مشکل شما رو فایل htaccess هست
اصلا ربطی به httpd.conf نداره
-
-
September 10th, 2013, 18:07
#9
پاسخ : mod_rewrite

نوشته اصلی توسط
E_R_B
مشکل شما رو فایل htaccess هست
اصلا ربطی به httpd.conf نداره
خب حالا باید چیکار کنم ؟ چطور مشکل رو حل کنم ؟
-
-
September 13th, 2013, 23:59
#10
پاسخ : mod_rewrite
-