3

I would like to have 'strict URLs' enabled, but see I have to include the template group name in the URL for the pages to link correctly (else the 404 shows).

All groups are fine but one. I have a group called 'site' where all misc pages are listed.

Is there a way to have only this folder removed similarly to index.php with the htaccess?

Thanks

3

Depending on usage, you may want to just use the Pages Module, which lets you configure custom URLs and connect them to the template of your choice. I use this quite a lot in my setups.

2

You're not actually hiding index.php with .htaccess, you're adding it (hidden) to the URL a person accesses. So you're not going to be removing (hiding) the template group, you'll be adding it the urls that require it. And that I think is the problem - knowing what URL's require the addition.

The only way I can think of is to hard code the template segments to identify when it should be added:

RewriteCond $1 ^(sitemap\.xml|sitemap_index\.xml|fb-page)$ [NC]
RewriteRule ^(.*)$ /index.php/site/$1 [L]

In the above example I have 3 templates in the 'site' group I want to be accessible directly:

  • sitemap.xml
  • sitemap_index.xml
  • fb-page

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.