I want to echo forward slash in php as follows
<a class="submenu" href="<?php echo base_url('products').'/'.rawurlencode('Agarbatte/Candle');?>"
Agarbatte/Candle is not a directory but when i do this, href takes this as directory and give me the error page not found.
Any help will be appreciated.
A slash in the URL will always be treated as a directory separator. And if you replace it with something else you won’t have a slash anymore. But that’s most likely the easiest solution..
If you have a 1:1 mapping between the path in the URL and your filesystem you are out of luck. If your application uses a “routing layer” though, you can modify it to not treat the
/as a separator when some criterium is met.