[SOLVED] Pretty url problemen

Nederlandse ondersteuning voor CMS Made Simple

Moderator: velden

Post Reply
Evert B.
Power Poster
Power Poster
Posts: 414
Joined: Fri Oct 20, 2006 12:07 pm

[SOLVED] Pretty url problemen

Post by Evert B. »

Beste mensen,

Ik wil mijn paleosite veranderen. Hij moet functioneler en interactiever. Eén van de dingen die ik wil regelen is dat ik gebruikers via email op de hoogte kan brengen van nieuwe blog berichten. De volgende tutorial leek mij een uitstekende oplossing:
http://visualharmonydesign.com/blog/web ... eedburner/

Hiervoor is pretty url nodig. En dit krijg ik niet aan de praat. Vreemd want op andere sites werkt het wel.

Dit staat er in mijn config:

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.  
  $config['url_rewriting'] = 'mod_rewrite';

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

  #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';
Mijn .htaccess:

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

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

#Options +FollowSymLinks

# To prevend E_STRICT problems with PHP 5.3+ you can uncomment the following lines
# Note: These settings should only be enabled for production sites!
#php_flag display_startup_errors 0
#php_flag display_errors 0
#php_flag html_errors 0
#php_value docref_root 0
#php_value docref_ext 0

<IfModule mod_rewrite.c>
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]
</IfModule>

<IfModule mod_header.c>
# Disable ETags
Header unset ETag
FileEtag None
</IfModule>

<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>
En als ik op een link in het menu klik kom ik steeds op een 301 -foutpagina. De url is wel pretty maar met een 301 pagina schiet ik er weinig mee op :S. Wie ziet wat ik fout doe?

Oja: omdat ik de site aan het maken bn staat hij in de map /test. Ik neem aan dat dit de root is waar het .htaccess in moet? Of moet ie echt in de root van de webserver? Beide opties werken trouwens niet.

Thanks Evert
Last edited by Evert B. on Tue Aug 23, 2011 11:19 am, edited 1 time in total.
deactivated010521

Re: Pretty url problemen

Post by deactivated010521 »

----------
Last edited by deactivated010521 on Tue Mar 12, 2013 5:45 pm, edited 1 time in total.
Evert B.
Power Poster
Power Poster
Posts: 414
Joined: Fri Oct 20, 2006 12:07 pm

Re: Pretty url problemen

Post by Evert B. »

arnoud wrote: De RewriteBase moet verwijzen naar je submap.
YES!
Dat is t Arnoud, thanks!
Evert
Post Reply

Return to “Dutch - Nederlands”