Prevent news detail url to display template
Posted: Tue Nov 22, 2016 5:09 pm
Hi again.
I use bootstrap template. The news detail looks nice but the url in bworsers address line shows me right after the news title the template name:
http://dev2017.fabbrica-schloss-horst.d ... ews-detail
The title is: Sa. 31.12. ab 19h: Silvester im Schloss
Howe can i get ride of the ".../d,bootstrap-news-detail"
in url???
This is the news detail template:
This is the .htaccess
Thx 4 a tip...
MAP
I use bootstrap template. The news detail looks nice but the url in bworsers address line shows me right after the news title the template name:
http://dev2017.fabbrica-schloss-horst.d ... ews-detail
The title is: Sa. 31.12. ab 19h: Silvester im Schloss
Howe can i get ride of the ".../d,bootstrap-news-detail"
in url???
This is the news detail template:
Code: Select all
<!-- Creative bootstrap-news-detail-->
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
<div id="newsbody">
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
{if $field->type == 'file'}
{assign var='hasimage' value=true}
{* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
<div class="col-md-5 col-lg-6 col-xs-12"><img class="thumbnail img-responsive" src="{CGSmartImage src1=$entry->file_location src2=$field->value alias1='medium' notag=1 filter_watermark=1}" alt="{$entry->title|cms_escape:htmlall}" /></div>
{/if}
{/foreach}
{/if}
{if $hasimage}<div class="col-md-7 col-lg-6 col-xs-12">{/if}
<h2 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall}</h2>
<div class="text-muted "><small>{if $entry->postdate}<span><i class="fa fa-calendar"></i> {$entry->postdate|cms_date_format}</span>{/if}{if $entry->category} | <span><i class="fa fa-tag"></i> {$entry->category}</span>{/if}{if $entry->author} | <span><i class="fa fa-user"></i> {$entry->author}</span>{/if}</small></div>
{if $entry->summary}
<p class="lead">{eval var=$entry->summary}</p>
{/if}
{eval var=$entry->content}
{if $return_url != ""}
<div class="btn btn-default-nd pull-right"><i class="fa fa-chevron-left"></i> {$return_url}</div>
{/if}
{if $hasimage}</div>{/if}
</div>
<!-- /.news detail -->
Code: Select all
AddType x-mapp-php5.5 .php
AddHandler x-mapp-php5.5 .php
AddType video/mp4 .mp4
AddType video/webm .webm
AddType video/ogg .ogv
# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# except for form POSTS
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L,NE]
# 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,NE]
<IfModule mod_deflate.c>
# Compress css, plaintext, xml, gif, and images in transport.
AddOutputFilterByType DEFLATE text/css text/plain text/xml image/gif image/jpeg image/png
</IfModule>
<IfModule mod_expires.c>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
# Set expires tags on various files... so that the browser wont attempt to reload them.
ExpiresActive On
ExpiresDefault "access plus 1 year"
<IfModule mod_header.c>
# Setting cache control to public allowes proxy servers to cache the items too.
Header set Cache-Control "public"
</IfModule>
</FilesMatch>
</IfModule>
MAP