PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : mod_rewrite



GrOup
September 9th, 2013, 18:28
سلام
وقتی من کد زیر رو در اچ تی اکسس میزارم سرور ارور میده ببینید : (ارور 500)
15506
که مشکل باید از mod_rewrite باشه یعنی mod_rewrite
غیر فعال هستش . چطور تو سرور ویندوز 2003 این قسمت (mod_rewrite
)رو فعال کنم ؟ (از ومپ سرور استفاده میکنم .)



# 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]

compiler
September 9th, 2013, 18:48
سلام

ارور ۵۰۰ لزوما به این معنا نیست که mod_rewrite فعال نیست و ...

به جای yourdomain.com باید نام دامنه خودتون رو بنویسید!
شما اون قسمت ریدایرکت کردن به حالت با www رو فعلا حذف کنید
برای وی بی سئو هم کلا این رول ها رو کپی کن تو فایل .htaccess




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]

arDEmbOt
September 9th, 2013, 19:52
نحوه فعال کردن mod_rewrite در wamp , xamp

Enable mod_rewrite in windows , WAMP, XAMPP | PHP Tutorials (http://phpcollection.com/mod-rewrite-windows-wamp-xampp/)

GrOup
September 9th, 2013, 19:54
سلام

ارور ۵۰۰ لزوما به این معنا نیست که mod_rewrite فعال نیست و ...

به جای yourdomain.com باید نام دامنه خودتون رو بنویسید!
شما اون قسمت ریدایرکت کردن به حالت با www رو فعلا حذف کنید
برای وی بی سئو هم کلا این رول ها رو کپی کن تو فایل .htaccess




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]





بنده تمامی این کار ها رو انجام ددم ولی نشده .

GrOup
September 9th, 2013, 21:36
نحوه فعال کردن mod_rewrite در wamp , xamp

Enable mod_rewrite in windows , WAMP, XAMPP | PHP Tutorials (http://phpcollection.com/mod-rewrite-windows-wamp-xampp/)

ممنونم

میشه این قسمت رو بیشتر توضیح بدید ؟



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

arDEmbOt
September 9th, 2013, 21:44
ممنونم

میشه این قسمت رو بیشتر توضیح بدید ؟



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 گفته را اعمال می کنید

GrOup
September 9th, 2013, 21:52
در فایل httpd.conf دنبال خط می گردین که با DocumentRoot شروع شده است و اون تغییری که در Directory گفته را اعمال می کنید

به این شکل صحیح هست ؟




# 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:

E_R_B
September 10th, 2013, 12:27
مشکل شما رو فایل htaccess هست
اصلا ربطی به httpd.conf نداره

GrOup
September 10th, 2013, 18:07
مشکل شما رو فایل htaccess هست
اصلا ربطی به httpd.conf نداره

خب حالا باید چیکار کنم ؟ چطور مشکل رو حل کنم ؟

GrOup
September 13th, 2013, 23:59
up

≡ ALEX ≡
September 14th, 2013, 00:11
در نسخه های جدید Apache الزام به رعایت نوشتن استاندارد کد های htaccess وجود دارد و تمامی کد ها می بایست در تگ چک کننده مربوطه قرار داده شوند.

E_R_B
September 14th, 2013, 11:42
خب حالا باید چیکار کنم ؟ چطور مشکل رو حل کنم ؟

باید ببینید از apache چی می خواید بعد این فایل رو ادیت کنید