lawgostar 355 ارسال شده در تیر 94 گزارش بازنشر ارسال شده در تیر 94 سلامبنده سرچ کردم دیدم سایت من بدون www ایندکس بیشتری داره حالا میخام ورود با www را قفل کنم باید از کد زیر استفاده کنم؟؟RewriteEngine OnRewriteCond %{HTTP_HOST} !^www\.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]و ایا این کد ها برای فایل htaccess مناسب است؟<files ".htaccess">order allow,denydeny from all</files># pass the default character setAddDefaultCharset utf-8ErrorDocument 401 /error/401.phpErrorDocument 403 /error/403.phpErrorDocument 404 /error/404.phpErrorDocument 500 /error/500.phpRewriteEngine OnRewriteCond %{REQUEST_METHOD} POSTRewriteCond %{REQUEST_URI} .wp-comments-post\.php*RewriteCond %{HTTP_REFERER} !.*lawgostar.com.* [OR]RewriteCond %{HTTP_USER_AGENT} ^$RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]RewriteRule ^category/(.+)$ http://www.lawgostar.com/$1 [R=301,L]DirectoryIndex file.php file.htmlRewriteEngine OnRewriteCond %{HTTP_HOST} !^www\.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]<files wp-config.php>order allow,denydeny from all</files># BEGIN Compress text files<ifModule mod_deflate.c><filesMatch "\.(css|js|x?html?|php|woff|ttf|png|jpg|gif)$">SetOutputFilter DEFLATE</filesMatch></ifModule># END Compress text files# BEGIN Expire headers<ifModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" ExpiresByType application/x-javascript "access plus 1 year" ExpiresByType text/html "access plus 600 seconds" ExpiresByType application/xhtml+xml "access plus 600 seconds" ExpiresByType font/ttf "access plus 1 year" ExpiresByType font/woff "access plus 1 year"</ifModule># END Expire headers# BEGIN Cache-Control Headers<ifModule mod_headers.c> <filesMatch "\.(ico|jpe?g|png|gif|swf|woff|ttf)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> <filesMatch "\.(css)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> <filesMatch "\.(js)$"> Header set Cache-Control "max-age=2592000, private" </filesMatch> <filesMatch "\.(x?html?|php)$"> Header set Cache-Control "max-age=600, private, must-revalidate" </filesMatch></ifModule># END Cache-Control Headers# BEGIN Turn ETags Off<ifModule mod_headers.c> Header unset ETag</ifModule>FileETag None# END Turn ETags Off# BEGIN Remove Last-Modified Header<ifModule mod_headers.c> Header unset Last-Modified</ifModule># END Remove Last-Modified Header<IfModule mod_php.c>php_value suhosin.post.max_vars 7000php_value suhosin.request.max_vars 7000</IfModule># Block the include-only files.RewriteEngine OnRewriteBase /RewriteRule ^wp-admin/includes/ - [F,L]RewriteRule !^wp-includes/ - [S=3]RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]RewriteRule ^wp-includes/theme-compat/ - [F,L]Options All -Indexes نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .