Take the 2-minute tour ×
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It's 100% free, no registration required.

in htaccess or route.php where from you want you can give answer for this issue.

I Need some thing like this.if i have url :

http://tageto.pnf-sites.info/developer/headcategory_controller/head_category/Agriculture

than it must be replaced into

http://tageto.pnf-sites.info/developer/Agriculture

and if i have url like this

http://tageto.pnf-sites.info/developer/headcategory_controller/sub_category/Rice

than it must be replaced into

http://tageto.pnf-sites.info/developer/Rice

and if i have url like this

http://tageto.pnf-sites.info/developer/products/view_product/nokia-internet-stick-cs-17-hsdpa-144mbps-logo-nokia-black-1

than it must be replaced into

http://tageto.pnf-sites.info/developer/nokia-internet-stick-cs-17-hsdpa-144mbps-logo-nokia-black-1

Can anybody solve my this issue? Please reply rapidly.

.htaccess

 <IfModule mod_rewrite.c>

RewriteEngine On

    # Removes index.php from ExpressionEngine URLs
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
  #  RewriteRule ^(.*)$ /index.php/$1 [L]

RewriteRule ^(.*)$ index.php/$1 [L] To remove index.php i need all i mentioned above for url so that url becomes canonical.

share|improve this question

1 Answer 1

Template Routes

Control your URLs by remapping URI routes to a specific template, using CodeIgniter-style routing rules.

$config['template_routes'] = array(
    'blog/:category' => 'site/blog-category',
    'blog/:year/:pagination' => 'site/blog-yearly-archive',
    'blog/:any' => 'site/blog-single',
);
share|improve this answer
    
Sir i already using it [$route['headcategory/(:any)'] = 'headcategory_controller/headcategory/$1'; $route['subcategory/(:any)/(:any)'] = 'headcategory_controller/subcategory/$1/$2';] . But i want to remove [subcategory] and [headcategory] before it –  user2387 Nov 21 '13 at 7:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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