Reputation: 43
i'm creating a website with CMS made simple version 1.11.11 and i use the listit2 module version 1.4.1 .
Now this module only can generate urls in this form:
http://example.com/listit2/item-alias/page-id
Now, i don't care about the page id which is used to show the correct template,
but since this is a multilingual website i would like listit2 to apear behind my (virtual) language folder:
http://example.com/lang/listit2/item-alias/page-id
so i added 2 rewrite lines in my htaccess file, right before the general rewrite rules of CMSMS.
RewriteCond %{HTTP_HOST} ^lang/listit2 [NC] RewriteRule ^lang/listit2(.*)$ listit2$1 # Rewrites urls in the form of /parent/child/ # but only rewrites if the requested URL is not a file or directory RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ index.php?page=$1 [QSA]
but that doesn't seem to work since it generates the summary overview instead of a detail page like the content from http://example.com/listit2/page-id
How, can i solve this?
Upvotes: 0
Views: 348
Reputation: 88
It isn't a .htaccess issue. It is a URL generation issue within the ListIt2 module.
Within your summary template, instead of using the standard variable for the detail_url, you will need to put your own custom URL in the href.
For example something like this (this code isn't test, check documentation for the actual variables)
<a href="{root_url}/lang/listit2/{$item->item_alias}/{$content_id}" title="Read more about {$item->title}">Read More...</a>
Upvotes: 0
Reputation: 43
This does the trick
RewriteEngine on RewriteBase / #Virtual folders for listit2 RewriteRule ^lang/listit2(.*)$ index.php?page=listit2$1 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Upvotes: 0