कैसे .htaccess फ़ाइल के माध्यम से 301 रीडायरेक्ट करें
नमस्ते प्रिय जनों!
मैंने पृष्ठ से 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/