-2

Im now developing a websites with a number of internal links present in each page. the project is in codeigniter.

on some part of the html code , i used anchor links for internal linking like

<a href="http://something.com/products/product_1/features/#quality">Quality</a>

there is a <div id="quality">Product Quality</div> in the

http://something.com/products/product_1/features page .

But when im clicking on this link , nothing will happen (other a href with normal links are working).i done this same process in my previous projects , but they are in php without any framework. is there any problem with using hash in href links in codeigniter.?

Suggest me some solution. any help would be greatly appreciated

chris85
  • 23,846
  • 7
  • 34
  • 51
Shifana Mubi
  • 197
  • 1
  • 3
  • 17
  • 1
    What if the link is `http://something.com/products/product_1/features#quality`? – chris85 Jun 30 '15 at 13:00
  • There are no issue with code igniter and anchor tags, try what @chris85 suggested and let us know. – mituw16 Jun 30 '15 at 13:01
  • if the link is http://something.com/products/product_1/features#quality , i assumed that the page is redirected to the quality section (
    some content
    ) of features page.
    – Shifana Mubi Jul 01 '15 at 05:12

1 Answers1

0

You may need to configure your routes

CI2 http://www.codeigniter.com/userguide2/general/routing.html

CI3 http://www.codeigniter.com/user_guide/general/routing.html

$route['products/product_1/features/(:any)'] = 'products/product_1/features/$1';

Make sure you have allowed hash application/config/config.php

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-=&?#';

http://www.codeigniter.com/docs