0

I am working on SEF - router.php to make my site url user friendly. This is my url and I want to remove the name 'component' and 'com_test' from this url.

http://localhost/projects/component/com_test/project/1-unique.html

I have checked with unset($query['view']) but it doesn't make any changes on the site.

Note : Please dont got for creating menu item for aliases.

Kathir SRS
  • 37
  • 7
  • 1
    have you read [Supporting SEF URLs in your component](http://docs.joomla.org/Supporting_SEF_URLs_in_your_component) ? – Lodder Mar 29 '13 at 15:18
  • Yes, Thanks but I read and made the changes but if only after enabling the menu item for the link it works and without menu item the same thing is repeating. – Kathir SRS Mar 30 '13 at 04:55

1 Answers1

1

You need menu items for that. otherwise you will get exactly these URLs. There is no way to avoid the /component/com_test/ part as Joomla is not able to guess what you want to do. The part behind that (/project/1-unqiue) is up to the router.php of your component.

If you don't want to have a menu item visible on your site, you can also create hidden menu items just for SEF purposes. You create a new menu with those menu items in it, but don't assign it to a module or just don't show the assigned module on any page.

Bakual
  • 2,731
  • 1
  • 13
  • 16
  • Yes, you are right. but is there any possibilities to make this as my requirement in .htaccess also – Kathir SRS Apr 01 '13 at 06:37
  • You could do rewrite rules in your .htaccess. But creating menu items (or using a SEF component) is surely the better way. – Bakual Apr 01 '13 at 07:34