logo

Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

How to set up a 301 redirect on the engine using the .htaccess file

22/02/2025, by Anonymous (not verified)

Hello, dear ones!

 

I wanted to set up a 301 redirect from the page  mysite.ru/index.php  to http://www.rospechati.ru. I wrote the following code at the end of the .htaccess file:

  

 Redirect 301 /mysite.ru/index.php

http://www.mysite.ru/http://www.mysite.ru/

 

Please tell me if I did this correctly or not.

Thank you in advance!

 

Here is the full code of the .htaccess file:

 

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/