1

Non SEF URL

http://www.example.com/index.php?option=com_yourcomponent&view=article&id=20&Itemid=50

SEF URL

http://www.example.com/example-menu-item/20

Is it possible to create SEF without the value 20 in the URL. We believe having 20 in the URL exposes the primary key of the record.

  • One way is to do create menu item for each of the article. That will allow you full control on the URL. But I think you are talking about something similar to this: joomla.stackexchange.com/questions/988/… – sifu Oct 2 '15 at 22:24
1

You can use .htaccess URL Rewrite replacing the numeric segment to something else but you have to make sure your item's alias column is unique in your component's table unless the same URL segments being generated will conflict.

0

You can use Joomla Rewriting and .htaccess file:

System >> Global Configuration >> Use URL Rewriting YES; Rename htaccess.txt to .htaccess in your root folder; Implement in your .htaccess file one rule like this:

## Mod_rewrite
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^[0-9]/(.*)$ /$1 [R=301,L]

You can see complete explanation how rewrite works here: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.