Answer the question
In order to leave comments, you need to log in
Keeping old site URLs?
There is a site with a lot of information, *.html format pages. This site needs to be updated, transfer all the information to the database, update the design, make more or less normal CNC, but at the same time keep the old URLs so that there are no 404 errors. I understand this can be done using mod_rewrite or something else? Tell me please. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
This can indeed be done with mod_rewrite. (See the Apache tutorial for details .)
It can indeed be done some other way. For example, with mod_alias .
Here is an example .htaccess file how to do it with mod_rewrite:
RewriteEngine On
RewriteBase /
RewriteRule ^old/document.html$ index.php?page=new_document [L]
RewriteRule ^old/(\w+).html$ index.php?page=new_$1[L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question