Difference between revisions of "Adding www to a url/fa"
From Joomla! Documentation
(Created page with "یک راه حل کامل تر برای اصلاح مشکلات دیگر در زمان یکسان:") |
(Created page with "Category:FAQ/fa Category:Installation/fa Category:Server configurations/fa") |
||
Line 28: | Line 28: | ||
<noinclude> | <noinclude> | ||
− | [[Category:FAQ]] | + | [[Category:FAQ/fa]] |
− | [[Category:Installation]] | + | [[Category:Installation/fa]] |
− | [[Category:Server configurations]] | + | [[Category:Server configurations/fa]] |
</noinclude> | </noinclude> |
Revision as of 13:41, 1 March 2016
چطور من www را به عنوان پیشوند در همه سایت های جوملا خودم بگیرم؟
عبارت های زیر را به پرونده .htaccess اضافه کنید:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
یک راه حل کامل تر برای اصلاح مشکلات دیگر در زمان یکسان:
RewriteEngine On
#
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html?\ HTTP/
RewriteRule ^(([^/]+/)*)index\.html?$ http://www.example.com/$1 [R=301,L]
#
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^(([^/]+/)*)index\.php$ http%2://www.example.com/$1 [R=301,L]
#
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]