Kako napraviti 301 redirekciju na CMS pomoću .htaccess datoteke
Добар дан, уважањи!
Хтео сам да направим 301 редирект са странице mysite.ru/index.php на http://www.rospechati.ru и написао сам следећи код на крају фајла .htaccess :
Redirect 301 /mysite.ru/index.php
http://www.mysite.ru/http://www.mysite.ru/
реците молим вас да ли сам то исправно урадио или не.
Хвала унапред!
Ево комплетног кода фајла .htaccess:
RewriteEngine on
DirectoryIndex /pages/index.php
Options +FollowSymLinks -Indexes -MultiViews
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{DOCUMENT_ROOT}/pages%{REQUEST_URI} -f [NC]
RewriteRule ^/?([^?]+)?\.php$ /pages/$1\.php [NC,QSA,L]
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 0 day"
ExpiresByType text/javascript "access plus 0 days"
ExpiresByType application/x-javascript "access plus 0 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/jpg "access plus 7 days"
ExpiresByType image/png "access plus 7 days"
ExpiresByType image/x-icon "access plus 7 days"
</IfModule>
<IfModule mod_deflate.s>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript application/x-javascript text/css
</IfModule>
Redirect 301 /mysite.ru/index.php
http://www.mysite.ru/http://www.mysite.ru/
- Пријавите се или се региструјте да би сте послали коментар