Pretty URL's in 1.9 bei 1und1

CMS made simple ist grundsätzlich in der Lage, für Suchmaschinen optimierte URLs auszugeben. Die Feinheiten rund um Pretty URLs & SEO können hier diskutiert werden.
Locked
tryr
New Member
New Member
Posts: 7
Joined: Mon May 04, 2009 7:46 am

Pretty URL's in 1.9 bei 1und1

Post by tryr »

Hallo an alle,
ich bin nach langer Suche und Anleitungen lesen immer noch Ratlos. Daher dachte ich ich frag mal ob jemand weiß was ich falsch mache.

Ich möchte Pretty URL's bei 1.9 auf meinem 1und1 Server zum funktionieren bringen.

Ich hab es inzwischen geschaft das er mir die URL in der Form http://domain/seite/unterseite schreibt aber nur wenn ich ein .html anfüge gelange ich auf die Seite. Was soweit auch korrekt ist weil ich .html wollte. Nur wird dies nicht angefügt wenn ich einen Link auf der Seite anklicke.

Nun meine Fragen:
- Wie muss ich die Einstellungen verändern das ich http://domain/seite/unterseite.html bekomme wenn ich auf einen Link klicke.
- Und wie kann ich auch auf das .html ganz verzichten (bitte beides erklären da ich es verstehen möchte)

Hier noch meine config.php :

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'] = '.html';

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

Code: Select all

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php



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]

# 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 [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+).html$ index.php?page=$1 [QSA] 
ich hoffe ihr könnt mir helfen und danke im Voraus schonmal ganz herzlich

lg Tryr
uniqu3

Re: Pretty URL's in 1.9 bei 1und1

Post by uniqu3 »

http://domain/seite/unterseite.html wäre,

Code: Select all

$config['page_extension'] = '.html';
http://domain/seite/unterseite wäre

Code: Select all

$config['page_extension'] = '';
und .htaccess statt
RewriteRule ^(.+).html$ index.php?page=$1 [QSA]

Code: Select all

RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Zumindest klappt das für mich, ob es so auch bei 1und1 funktioniert, keine Ahnung.
tryr
New Member
New Member
Posts: 7
Joined: Mon May 04, 2009 7:46 am

Re: Pretty URL's in 1.9 bei 1und1

Post by tryr »

Danke das war der Fehler nun klappt es.
Locked

Return to “Suchmaschinenoptimierung (SEO)”