I want to change the URL from:
www.example.com/api/
To:
www.example.com/
in which api folder i installed cakephp 3 and its working fine.
i want to remove api in the url and after this it looks like www.example.com.can someone please help me how to do this i don't want to change files from api folder to root directory. my api folder .htaccess is like below.
**.htaccess of api folder**
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
Add .htaccess in root (www) folder like
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ api/ [L]
RewriteRule (.*) api/$1 [L]
</IfModule>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.