There was a situation - there is a working site on WP in which there is a page with examples of landing pages with the address www.mysite.com/landing-page. Each landing-page example is a separate web page with its own CSS and JS files. You need to embed pages so that you get links like www.mysite.com/landing-page/1 or www.mysite.com/landing-page/2 and so that in the examples of landing-page you don’t have to reassign the file paths. Is it possible to implement this in Wordpress?

  • What does it mean to eat? And what prevents to do more? - SeVlad
  • one
    It means there is a valid site, and a page has been created in it for which you need to solve this problem. You do not need to do a new site, you need to implement everything on the existing site - Max Korolkov
  • And what prevents to do even 100 pages? And yes, where are the subdomains at all? - SeVlad
  • one
    The problem is that each page is a separate site with its own CSS and JS files. If I make them pages, then I have to edit the paths in the code for a normal display, what to do for a very long time due to the large number of these pages. - Max Korolkov
  • One page - the whole site? !!!! Oh God. OK, I'll write the answer how to do it. - SeVlad

2 answers 2

Try adding the following rule to the .htaccess rule:

RewriteBase /landing-page/ 

You should have something like this:

  # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /landing-page/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /landing-page/index.php [L] </IfModule> # END WordPress 

Taken from here: https://stackoverflow.com/questions/196500/configuring-wordpress-htaccess-to-view-subfolders

  • This solution works, thanks! - Max Korolkov

that each page is a separate site

If you need such a nightmare, then

Var1. VP from the root of the domain is removed (transferred to a subdirectory). At the root, directories are created for each site where a separate VI is installed for each site. A simple html / php file is placed at the root of the domain.

Var2. The root installs the VI in a network installation with subdirectories for sites.