example.com/wp
or example.com/wp/
<- This is what homepage link used to be like and I'm trying to keep it this way. But I want the server to serve some static page from another subfolder as a front page (but to keep all the other wp contents at the same places)
My static page (several of them tbh) are stored in root/subf1/
I was able to redirect to the desired subfolder, but the path also shows up in the URL. Is it possible to change example.com/subf1 to example/wp?
Here's my current htaccess. Maybe I need to create another one in a static page folder?
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/subf1/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /test/page/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ /subf1/index.html [L]
</IfModule>
RedirectMatch "^/wp$" "https://example.com/subf1/"
Thank you a lot for your time
Aucun commentaire:
Enregistrer un commentaire