×
=0) { let js = text.slice(pos1, pos2); + '<\/' + "script" + '>'; arrText.push(js); // next pos1 = pos2; continue; } } } break; } return arrText; } function OpenDialog(parentDiv, urlContent) { parentDiv = document.getElementById('modal-background'); // new !!!!!!! parentDiv.appendChild(document.getElementById('modal-template')); document.getElementById('modal-background').style.display = "block"; document.getElementById('modal-template').style.display = "flex"; // !!!!! document.getElementById('modal-body').innerHTML = ""; post_url(urlContent, "", function(text_from_server) { var element = document.getElementById('modal-body'); element.innerHTML = text_from_server; // add scripts var arrJSText = get_scripts(text_from_server); for (var i=0; i
dir.by
Search
Programming, development, testing
→
.htaccess file (commands)
→
RewriteRule (redirect from a group of pages to another page) in the .htaccess
Looked at
2793
times
RewriteRule (redirect from a group of pages to another page) in the .htaccess
last updated: 15 February 2020
Example 1
Sample file
.htaccess
RewriteRule
(.*)$
http:
//superpuper.by/my/
$1 [L,R=301]
Объяснение:
Redirect any page of the site →
http://superpuper.by/my
/page name
Here are specific examples:
Если файл
.htaccess
положить в
корень сайта dir.by
то запрос:
http://
dir.by
/hello.php
http://
dir.by
/super/puper/eee.php
redirect to
→
→
http://
superpuper.by/my
/hello.php
http://
superpuper.by/my
/super/puper/eee.php
Если файл
.htaccess
положить в
поддомен book
сайта
dir.by
то запрос:
http://
book.dir.by
/hello.php
http://
book.dir.by
/aaa/bbb.php
redirect to
→
→
http://
superpuper.by/my
/hello.php
http://
superpuper.by/my
/aaa/bbb.php
Example 2
Sample file
.htaccess
RewriteRule
^
Production
(.*)$
/
[L,R=301]
Объяснение:
Redirects everything that starts with
Production
→ root of the site
Here are specific examples:
Если файл
.htaccess
положить в
корень сайта dir.by
то запрос:
http://
dir.by
/Production
http://
dir.by
/Production/my.php
http://
dir.by
/Production/index.php
redirect to
→
→
→
http://
dir.by
http://
dir.by
http://
dir.by
← Previous topic
Redirect (redirect from one page to another page) in the .htaccess
Your feedback ... Comments ...
Your Name
Your comment
(www links can only be added by a logged-in user)
+ Picture
Объявления
Объявления
•
DirectoryIndex (main page for directory) in the .htaccess
•
Redirect (redirect from one page to another page) in the .htaccess
•
RewriteRule (redirect from a group of pages to another page) in the .htaccess
Ваши вопросы присылайте по почте:
info@dir.by