i have an application build in CI 3.x version now i want to redirect to a specific directory in the root folder. i have an anchor tag through which i will redirect to the path now here is what i am doing!
<a href="<?=base_url()?>ecommerce" class="shop-now-button">SHOP NOW</a>
//ecommerce is my directory name on root folder which contains the other website
now this is how the firefox is showing in inspect
<a href="http://clients.nextcrawl.ca/occ/ecommerce" class="shop-now-button">SHOP NOW</a>
which is the correct url! but what happens is when is actually click on it it takes me to the link http://localhost/occ/ecommerce/ and i have no idea how and why it is doing this.one more thing the ecommerce directory has a wordpress site in it.
My question is not a duplicate because in other cases base_url() doesnot work or works incorrect whereas in my case the base_url value is correct its just not taking to the correct path
When environment is changed (eg. dev/pro/local) make sure that you have cleared browser cache memory so new values that are set by application are shown correctly.
All in all:
-Windows
Ctrl+F5
-MacOS
Cmd+Shift+R
Or use private browsing window.
Very useful links:
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.