I have a website with the root folder 'www', but I put all php files including index.php in a sub-folder of root.
I wrote myself a .htaccess file to redirect, so if I input www.test.com, it will jump to www.test.com/folder and display the index.php.
Below it's my .htaccess which I put in the root.
RewriteEngine On
RewriteBase /
RewriteRule ^folder2 - [L]
#ignore folder2 in which I put important files, but no works for the website
RewriteCond %{REQUEST_URI} !^/folder(.*)
RewriteRule (.*) /folder/$1
Right now, I want to change the .htaccess file to reach these goals:
- When I input
www.test.com, jump towww.test.com/folderas usual, but display the url without folder. All the pages in folder will display the url without folder name. Such as
www.test.com/shop/page1->www.test.com/page1
I searched some of the scripts, but none of them works.
/shop/related to/folder/? Are they same?