Maintaining the old website URL?

0 like 0 dislike
9 views
Is there a site that has lots of information, pages, format *.html. This website must be updated to transfer all the information in the database, update the design, make a more or less normal CNC, but keep the old URLS to avoid 404 errors. I understand this can be done using mod_rewrite or something? Please tell me. Thanks in advance.
by | 9 views

3 Answers

0 like 0 dislike
It really is possible to do with mod_rewrite. (Details are set out in the manual of the Apache server.)
\r
It really is possible to do something. For example, using mod_alias.
by
0 like 0 dislike
Here is the example file .htaccess how to do it with mod_rewrite:
\r
RewriteEngine On RewriteBase / RewriteRule ^old/document.html$ index.php?page=new_document [L] 

To combine multiple documents using regular expressions, for example:
\r
RewriteRule ^old/(\\w+).html$ index.php?page=_$1[L] 

[L] means that this redirect will not continue to be handled by mod_rewrite and will lead directly into index.php.
by
0 like 0 dislike
Thank you!
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 8, 2019 by vessels
110,608 questions
257,186 answers
0 comments
28,701 users