Hello, I found 2 example about changing wp directory as below.
one from [https://www.ecenica.com/support/answer/how-to-change-my-document-root-to-a-folder-using-htaccess/])
RewriteEngine on
RewriteCond %{HTTP\_HOST} \^example.com$ \[NC,OR\]
RewriteCond %{HTTP\_HOST} \^www.example.com$
RewriteCond %{REQUEST\_URI} !directory/
RewriteRule (.\*) /directory/$1 \[L\]
​
the other from [https://wordpress.org/support/article/giving-wordpress-its-own-directory/]) (method I)
<IfModule mod\_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP\_HOST} \^(www.)?example.com$
RewriteCond %{REQUEST\_URI} !\^/my\_subdir/
RewriteCond %{REQUEST\_FILENAME} !-f
RewriteCond %{REQUEST\_FILENAME} !-d
RewriteRule \^(.\*)$ /my\_subdir/$1
RewriteCond %{HTTP\_HOST} \^(www.)?example.com$
RewriteRule \^(/)?$ my\_subdir/index.php \[L\]
</IfModule>
​
So, my questions is which config is better?
Is the config from WP documents only applied for WP sites and not other php CMS sites like Drupal or Joomla?
[ad_2]
I’ve tried the first config and it get 403 error in one host, in another host it works ok.