Rolf
[opgelost] Pretty URLS
Moderator: velden
Re: Pretty URLS
Heb je de .htaccess file er wel weer in staan?
Rolf
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Pretty URLS
CMS-er
Volgens mij is deze topic nog in de 'oude stijl':
http://forum.cmsmadesimple.org/index.ph ... #msg140890
R.
Volgens mij is deze topic nog in de 'oude stijl':
http://forum.cmsmadesimple.org/index.ph ... #msg140890
R.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
-
peterv0512
Re: Pretty URLS
Dag CMS-er,
Wat ik nu ga zeggen klinkt mischien ingewikkeld, maar dat is het he-le-maal niet.
In drie stappen heb je pretty URL's en de nieuwste functionaliteiten.
1. upgraden
-> download/unzip laatste versie
-> maak een backup van je database (laat phpmyadmin direct naar gzip bestand opslaan om gezeik met vreemde tekens te voorkomen)
-> download je eigen bestanden als backup (alle bestanden niet alleen "uploads")
-> laatste versie uploaden naar jouw server (alles overschrijven)
-> surf naar jouwurl.com/admin/upgrade.php en volg de stappen
-> normaal zal alles goed gaan, zo niet zet je je oude bestanden terug en importeer je de oude database
2 .htacces bestand aanpassen
-> maak een tekst bestand aan, noem dit .htacces
Waarschijnlijk gaat je windows pc hier moeilijk over doen, dan noem je het prettyUrls.htacces en hernoem je het na upload
-> in dit bestand staat(let op rewriteBase, dit is de root van je website):
-> upload bestand, indien nodig hernoemen
3. config.php aanpassen
Het stukje onder URL Setting moet er zo uitzien:
(de code in commentaar is natuurlijk niet nodig, maar ik laat het er voor alle duidelijkheid bij staan omdat het ook zo in het bestand staat)
Zoals ook in de commentaar staat, zorg bij het aanmaken van je template dat {metadata} erin staat, anders werkt het niet.
En dat is het dan. Ik hoop je hiermee van dienst te zijn geweest.
Mvg,
Peter
Wat ik nu ga zeggen klinkt mischien ingewikkeld, maar dat is het he-le-maal niet.
In drie stappen heb je pretty URL's en de nieuwste functionaliteiten.
1. upgraden
-> download/unzip laatste versie
-> maak een backup van je database (laat phpmyadmin direct naar gzip bestand opslaan om gezeik met vreemde tekens te voorkomen)
-> download je eigen bestanden als backup (alle bestanden niet alleen "uploads")
-> laatste versie uploaden naar jouw server (alles overschrijven)
-> surf naar jouwurl.com/admin/upgrade.php en volg de stappen
-> normaal zal alles goed gaan, zo niet zet je je oude bestanden terug en importeer je de oude database
2 .htacces bestand aanpassen
-> maak een tekst bestand aan, noem dit .htacces
Waarschijnlijk gaat je windows pc hier moeilijk over doen, dan noem je het prettyUrls.htacces en hernoem je het na upload
-> in dit bestand staat(let op rewriteBase, dit is de root van je website):
Code: Select all
# No sense advertising what we are running
ServerSignature Off
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !\.
# 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 ^(.+).htm$ index.php?page=$1 [QSA]
3. config.php aanpassen
Het stukje onder URL Setting moet er zo uitzien:
(de code in commentaar is natuurlijk niet nodig, maar ik laat het er voor alle duidelijkheid bij staan omdat het ook zo in het bestand staat)
Code: Select all
#------------
#URL Settings
#------------
#What type of URL rewriting should we be using for pretty URLs? Valid options are:
#'none', 'internal', and 'mod_rewrite'. 'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates. For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mod_rewrite';
#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.htm';
#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'] = true;
#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';
En dat is het dan. Ik hoop je hiermee van dienst te zijn geweest.
Mvg,
Peter
-
peterv0512
Re: Pretty URLS
Dan was ik nog 1 ding vergeten: Als je klaar bent met de upgrade, ga dan in het admin gedeelte naar modules, zoek naar tinyMCE en klik hier op uninstall en klik terug op install (anders werkt dat na upgrade doorgaans niet meer).
Re: Pretty URLS
Mijn provider geeft het volgende aan:
Gregor
Dit zijn wel waarden die ik nodig heb om pretty urls werkend te krijgen. Hoe zou ik dit kunnen oplossen?Je gebruikt php_flag of php_value in je .htaccess bestanden, dat mag niet.
Gregor
Re: Pretty URLS
Ohh, maar pretty url gebruikt deze helemaal nietGregor wrote: Mijn provider geeft het volgende aan:Dit zijn wel waarden die ik nodig heb om pretty urls werkend te krijgen. Hoe zou ik dit kunnen oplossen?Je gebruikt php_flag of php_value in je .htaccess bestanden, dat mag niet.
Gregor
Standaard staat dit ook niet aan in de meegeleverde htaccess.txt
In deze post staat de werkwijze beschreven:
http://forum.cmsmadesimple.org/index.ph ... 912.0.html
Zet anders hier eens wat informatie neer, dan kunnen we even mee kijken...
@ CMS-er
Is het al gelukt? Alles pretty?
Grt. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Pretty URLS
Dank je Rolf!
De website draaien op 1 server en daarbinnen zijn de verschillende domeinen uitgezet, dus
www.e-factive.nl
heeft nu pretty url's, maar
www.uisge-beatha.eu
heeft dat niet.
Ik heb maar 1 .htacces en die staat hier:
/home/efacti/public_html/.htaccess
maak ik er een onder uisge-beatha.eu aan, dan krijg ik een error 500
Er zijn 2 confog.php's en een daarvan staat in:
/home/efacti/public_html/uisge-beatha.eu/config.php
overigens beide config-files heb ik aangepast conform instructie
Enig idee??
Gregor
De website draaien op 1 server en daarbinnen zijn de verschillende domeinen uitgezet, dus
www.e-factive.nl
heeft nu pretty url's, maar
www.uisge-beatha.eu
heeft dat niet.
Ik heb maar 1 .htacces en die staat hier:
/home/efacti/public_html/.htaccess
maak ik er een onder uisge-beatha.eu aan, dan krijg ik een error 500
Er zijn 2 confog.php's en een daarvan staat in:
/home/efacti/public_html/uisge-beatha.eu/config.php
overigens beide config-files heb ik aangepast conform instructie
Enig idee??
Gregor
Re: Pretty URLS
Dit wil nog wel eens helpen:
Deze regel geeft bij sommige hosts een error 500.
Maar de regel is voor pretty url niet noodzakelijk. # ervoor dus.
Grt. Rolf
Code: Select all
# Options +FollowSymLinks
Maar de regel is voor pretty url niet noodzakelijk. # ervoor dus.
Grt. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Pretty URLS
Een # ervoor geplaatst, .htaccess gekopieerd naar uisge-beatha.eu geen error en ook geen pretty url op www.uisge-beatha.eu
Enig idee waar verder te zoeken?
Gregor
Gregor
-
peterv0512
Re: Pretty URLS
Dus als ik het goed begrijp staat uisge-beatha.eu in een submap op dezelfde server?Gregor wrote: Er zijn 2 confog.php's en een daarvan staat in:
/home/efacti/public_html/uisge-beatha.eu/config.php
overigens beide config-files heb ik aangepast conform instructie
Dan moet je je rewritebase aanpassen. Die is dan niet meer de root (/) maar de juiste map /uisge-beatha.eu/
Dat wordt dan
Code: Select all
RewriteBase /uisge-beatha.eu/Re: Pretty URLS
Het staat op dezelfde server (ik kan bij Neostrade meerdere domeinen binnen 1 hostingspakket plaatsen).
Als ik de rewritebase .htaccess binnen Uisge-beatha.eu aanpas zoals aangegeven, dan leidt dat niet tot een succes. Op e-factive.nl is pretty url's wel zichtbaar en werkend. De .htaccess van uisge-beatha ziet er als volgt uit:
Als ik de rewritebase .htaccess binnen Uisge-beatha.eu aanpas zoals aangegeven, dan leidt dat niet tot een succes. Op e-factive.nl is pretty url's wel zichtbaar en werkend. De .htaccess van uisge-beatha ziet er als volgt uit:
# .htaccess voor Uisge Beatha
# 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
#
# op aanraden forum cmsms ervoor geplaatst
#Options +FollowSymLinks
#
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /uisge-beatha.eu
#
# 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]
#
# 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]
-
peterv0512
Re: Pretty URLS
Heb je je config.php bestand al aangepast? In je website zijn de links nog index.php?page=... dus ik denk van niet...
Re: Pretty URLS
De root van de website is uisge-beatha.eu.
Vanaf dit punt staat het cms niet in een submap, je hoeft dan ook geen rewritebase toe te passen, dus:
Heb je verder de {metadata} tag in de html sjabloon staan?
De config.php aangepast met mod_rewrite?
Rolf
Vanaf dit punt staat het cms niet in een submap, je hoeft dan ook geen rewritebase toe te passen, dus:
Code: Select all
#Sub-dir e.g: /cmsms
RewriteBase /
De config.php aangepast met mod_rewrite?
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Pretty URLS
In config.php staat:
De tag {metadata} staat in de templates. RewriteBase is weer teruggezet naar /
Gregor
Code: Select all
#------------
#URL Settings
#------------
#What type of URL rewriting should we be using for pretty URLs? Valid options are:
#'none', 'internal', and 'mod_rewrite'. 'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates. For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mode_rewrite';
#$config['url_rewriting'] = 'none';
#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';
#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'] = true;
#$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';Gregor
Re: Pretty URLS
De .htaccess file moet in de root van de website.Gregor wrote: Ik heb maar 1 .htacces en die staat hier:
/home/efacti/public_html/.htaccess
maak ik er een onder uisge-beatha.eu aan, dan krijg ik een error 500
Dat is op de plaats waar ook de index.php en config.php van deze website staan.
®olf
PS. Hier dus: /home/efacti/public_html/uisge-beatha.eu/.htaccess
Last edited by Rolf on Thu Jan 21, 2010 1:54 pm, edited 1 time in total.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -


