Ik dacht pretty url's aan te hebben staan

Nederlandse ondersteuning voor CMS Made Simple

Moderator: velden

Post Reply
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Ik dacht pretty url's aan te hebben staan

Post by Gregor »

Hallo,

Ik dacht op mijn site pretty url's aan te hebben staan, zie ik ineens deze url:
/index.php?mact=CGBlog,m2f36f,default,1 ... en&m2f36fp

Gezien de summarytemplate en de inhoud, weet ik dat deze link recentelijk is aangemaakt, nl. gisteren. De .htaccess ziet er zo uit:

Code: Select all

# 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
#php_flag display_errors off
SetEnv TZ Europe/Amsterdam

#enable php.ini
suPHP_ConfigPath /home/efacti/php.ini

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
# redirect naar www vanaf zonder www
RewriteCond %{HTTP_HOST} ^uisge-beatha\.eu [NC]
RewriteRule ^(.*)$ http://www.uisge-beatha.eu/$1 [L,R=301]
#
#
#Sub-dir e.g: /cmsms
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^news/([0-9]{1,4})/([0-9]{1,4})/([A-Za-z0-9-]+)\.html$ /logboek/$1/$3\.html [R=301,QSA,L]

# all the other /news cases
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^news/(.*)$  /logboek/$1 [R=301,QSA,L]

# showtemplate=false -> showtemplate=true
RewriteCond %{QUERY_STRING} ^(([^&]*&)*)cntnt01showtemplate=false(&.*)?$
RewriteRule ^index\.php$ /index.php?%1cntnt01showtemplate=true%3 [L,R=301]

# redundant ?
RewriteCond %{QUERY_STRING} ^(([^&]*&)*)showtemplate=false(&.*)?$
RewriteRule ^index\.php$ /index.php?%1showtemplate=true%3 [L,R=301]

#RewriteRule ^(.*)test.html$  index.php?page=404 [R=404,L]
#ErrorDocument 404  /index.php?page=404

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# 301 redirect of IP-address to URL
RewriteCond %{HTTP_HOST} ^31\.186\.169\.19
RewriteRule (.*) http://www.uisge-beatha/$1 [R=301,L]
#
# 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]
</IfModule>

# Optimization of the website
AddOutputFilterByType DEFLATE text/html text/plain text/xml 

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# modified 18mei2010
# Don't compress images
# SetEnvIfNoCase Request_URI \
# \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# modified 18mei2010
# turn on the module for this directory
ExpiresActive on
# set default
ExpiresDefault "access plus 72 hours"
ExpiresByType image/jpg "access plus 3 months"
ExpiresByType image/ico "access plus 1 year"
ExpiresByType image/gif "access plus 3 months"
ExpiresByType image/jpeg "access plus 3 months"
ExpiresByType image/png "access plus 3 months"
# ExpiresByType text/css "access plus 1 months"
ExpiresByType text/javascript "access plus 3 months"
ExpiresByType application/javascript "access plus 3 months"
ExpiresByType application/x-shockwave-flash "access plus 3 months"
#
#
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"
</FilesMatch>
#
#
#
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
#
#
# use images on sub domain
#
# Order deny,allow
# RewriteEngine  on
# RewriteCond %{REQUEST_URI} \.(ico|gif|jpg|jpeg|png|flv|pdf|mp3|wav|js|css|kml|xml)$
# RewriteCond %{HTTP_HOST} ^www\.image\. [NC]
# RewriteRule .* http://www.uisge-beatha.eu/uploads/images%{REQUEST_URI} [R=301,L]
Iemand een idee wat de oorzaak hiervan kan zijn?

Grtz., Gregor
MDK
Forum Members
Forum Members
Posts: 76
Joined: Sun Apr 24, 2011 12:17 pm

Re: Ik dacht pretty url's aan te hebben staan

Post by MDK »

Code: Select all

$config ['url_rewriting'] = 'mod_rewrite' ;  
zou moeten werken als je het in je config.php zet en de rest kan je regelen via je htacess. Ik heb het zo gedaan.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Ik dacht pretty url's aan te hebben staan

Post by Jos »

Kan zijn dat je teveel parameters gebruikt in de {CGBlog} tag
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: Ik dacht pretty url's aan te hebben staan

Post by Gregor »

Dank voor jullie reactie.

De instelling in config.php staat/stond er.

Het aantal parameters van CGBlog, ik wist niet dat daar een aantal aanzit waardoor er mogelijk een andere url ontstaat. De aanroep ziet er als volgt uit, in de linkerkolom worden er twee aangeroepen, beide met verschillende categorieën:

{CGBlog pagelimit="3" detailpage="logboekpagina" lang="nl_NL" summarytemplate="UB_Logbook_frntpg" category="Logboek,Tochten"}

{CGBlog number="3" detailpage="Nieuwtjes" lang="nl_NL" summarytemplate ="UB_Nieuwtjes_frntpg" category="General,Motor,Te water lating,Binnenboord,Onderhoud,Statistiek,Hardlopen"}

Is er een oplossing die hetzelfde doet maar met minder parameters?

Grtz., Gregor
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Ik dacht pretty url's aan te hebben staan

Post by Jos »

Het gaat niet om het aantal maar om welke parameters je gebruikt... sommige parameters moeten met de url meegestuurd worden (dat zie je in de url ook terug). Als er in de module geen rewrite-rule voor die (set van) parameter is, dan zal de url alleen op de 'ugly' manier kunnen.

Tenminste.. dat kan ik me van de News module herinneren met bijvoorbeeld de parameter detailtemplate.

detailpage, number, summarytemplate, lang zouden het probleem niet (mogen) zijn... Je zou eens kunnen checken of je wel pretty urls krijgt als je de category parameter even weghaalt?
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: Ik dacht pretty url's aan te hebben staan

Post by Gregor »

Tamelijk bizar, als ik op de links klik onder het kopje 'Nieuws' (http://www.uisge-beatha.eu dan zie ik pretty url's. Haal ik de Category eruit, dan blijft het pretty. Zo schiet het zoeken naar de oorzaak niet op. Voor nu misschien maar even op een hik houden....

Grtz., Gregor
Post Reply

Return to “Dutch - Nederlands”