Page 1 of 1

Foutpagina/ redirect

Posted: Tue Sep 28, 2010 9:02 am
by Gaby Verdouw
Hallo,

Ik heb de fora al afgestruind, maar ik kom er toch niet uit.
Ik heb de site ;http://www.geevadvies.nl gemaakt.
Deze bestond al, maar nu ik met CMS Made Simple aan het stoeien ben, is de plaats waar de site op de server staat veranderd.
De domeinnaam is hetzelfde gebleven.
Ik heb binnen cmsms een Fout-pagina aangemaakt in de verwachting dat iedereen die een oude pagina wil bezoeken, bijv. via Google, dan op die pagina terechtkomt en kan doornavigeren op de nieuwe website.
Als ik echter ;http://www.geevadvies.nl/onzin intyp, krijg ik de 404 pagina van Google te zien, en niet die van mezelf.
Wat doe ik fout?
Ik heb CMSms versie  1.8.2 "Toliara"
Kan iemand mij helpen aub?
Gaby

Re: Foutpagina/ redirect

Posted: Tue Sep 28, 2010 9:10 am
by RonnyK
Aangezien je GEEN pretty-URL gebruikt, is je pagina-structuur niet....

domein.nl/pagina

maar

;http://www.geevadvies.nl/index.php?page=pagina

Dus de opgegeven URL is geen cmsms-pagina, omdat die ACHTER, ;http://www.geevadvies.nl/index.php?page= staan.

Je zou b.v. pretty URL kunnen aanzetten, waarna de door je opgegeven pagina, wel als interne pagina gezocht zou worden...

;http://www.geevadvies.nl/index.php?page=geen-pagina geeft namelijk WEL je custom404.

Ronny

Re: Foutpagina/ redirect

Posted: Tue Sep 28, 2010 9:43 am
by Gaby Verdouw
Dank je, daar zit dus de fout.
Nu nog even uitvinden hoe je die pretty url nou goed aanzet.
Ook daarnaar heb ik gezocht binnen de fora, maar ook dat ben ik nog niet de baas.

Mijn config.php:
#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = True;


#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';


#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism? This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = True;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = false;

#If using none of the above options, what should we be using for the query string
#variable? (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

Daar moet ik dat toch doen?

Re: Foutpagina/ redirect

Posted: Tue Sep 28, 2010 9:46 am
by RonnyK
Dit is niet een kopie van je config.php, neem ik aan? Dit is namelijk een 'oude' structuur, niet de 1.8.2 structuur van een config.php

Mocht je op een unix server draaien, dan kun je het volgende doen....

Kopieer de /doc/htaccess.txt naar de root en rename naar .htaccess

In de config.php zet de URL_REWRITE op 'mod_rewrite'
zet de page-extension op b.v. '.html'

Ronny

Re: Foutpagina/ redirect

Posted: Tue Sep 28, 2010 9:50 am
by Gaby Verdouw
Ronny, Ik heb de originele versie bewaard, als het goed is, is at:
#------------
#URL Settings
#------------

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = True;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '/';

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism? This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = True;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = false;

#If using none of the above options, what should we be using for the query string
#variable? (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

Met het kopiëren en hernoemen van de htacces deed ik denk ik iets niet goed, want toen kreeg ik een melding bij het bezoeken van de site:
forbidden ....
Daarna nog eens gedaan en toen ging het goed.

mijn htacces ziet er nu zo uit:
# 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

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
#Options +FollowSymLinks
#

RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /

#
# 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]

# 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]