Tuxlog

Tuxlog, aus dem Alltag eines Linux-Fans

wp-greet – Grußkarten mit Permalinks, wp-greet greetcards with permalinks

Die Anfrage wir man seine wp-greet Grußkarten suchmaschinentauglich und SEO-optimiert mit Permalinks versehen kann, habe ich jetzt doch zu häufig gehört, als das ich sie unbeantwortet lassen möchte. Alles was man dazu braucht ist einen Provider, der mod_rewrite zur Verfügung stellt. Dann muss man nur noch die Datei .htaccess im WordPress-Hauptverzeichnis editieren.

Fügt man beispielsweise folgenden Code in die Datei .htaccess ein, so werden alle Aufrufe die auf wp-greet/greetcard/* enden umgeleitet auf http://meinedomain/?page_id=2&gallery=1&image=http://meinedomain/wp-content/gallery/postkarten/*

RewriteEngine on 
RewriteRule ^wp-greet/greetcard/(.*)$ http://meinedomain/?page_id=2&gallery=1&image=http://meinedomain/wp-content/gallery/postkarten/$1

Dabei steht das Sternchen für den Dateinamen des Grußkartenbildes. Den Pfad zum Bild und zur Seite mit dem Grußkartenformular muss man natürlich anpassen. Im Beispiel findet sich das Grußkartenformular unter http://meinedomain/?page_id=2, die Bilder stehen in der Gallery mit der ID 1 von NextGenGallery und die Bilder liegen im Verzeichnis http://meinedomain/wp-content/gallery/postkarten.

Mehr dazu findet man im Apache mod_rewrite Guide oder der deutschsprachigen Seite über mod_rewrite.


 
The question about using permalinks for greeting cards raised some times in the past and therefore I want to give a little advice on how you can manage to get to SEO friendly permalinks for you greeting cards using wp-greet. All you need is a provider letting you access mod_rewrite. All you have to do is modify your .htaccess file in the wordpress main directory.

Adding the following code to your .htaccess file will for example, redirect calls to url’s containing wp-greet/greetcard/* to http://mydomain/?page_id=2&gallery=1&image=http://mydomain/wp-content/gallery/postkarten/*

RewriteEngine on 
RewriteRule ^wp-greet/greetcard/(.*)$ http://mydomain/?page_id=2&gallery=1&image=http://mydomain/wp-content/gallery/postkarten/$1

The * stands for the filename of the greetcard picture. Of course you have to adopt the path for the greetcard form and the pictures. Looking at the example the greetcard form is placed at http://mydomain/?page_id=2, the pictures are stored in the gallery with ID 1 of NextGenGallery and the pictures are stored in the directory http://mydomain/wp-content/gallery/postkarten.

Details about mod_rewrite can be found at the Apache mod_rewrite guide or the german site about mod_rewrite.

Artikel, die auch interessant sein könnten:

Diesen Artikel mit anderen teilen: Diese Icons verlinken auf Bookmark Dienste bei denen Nutzer neue Inhalte finden und mit anderen teilen können.
  • Print
  • email
  • Technorati
  • del.icio.us
  • MisterWong
  • Linkarena
  • Alltagz
  • Blogosphere News
  • Google Bookmarks
  • YahooMyWeb
  • Y!GG
  • Bloglines
  • TwitThis
  • Webnews
  • Digg
  • Wikio DE
  • Oneview
  • Facebook
  • XING

4. Dezember 2011 Geschrieben von | SelbstEntwickelt, wordpress | 3 Kommentare | Trackback URI

3 Kommentare zu wp-greet – Grußkarten mit Permalinks, wp-greet greetcards with permalinks

  1. 2

    Hello,http://www.tuxlog.de/wp-content/plugins/wp-monalisa/icons/wpml_bye.gif
    I hope there is someone there that can read English. I found your WordPress plugin wp-greet and wanted to find out more about it. Is there instructions available in english?
    It looks like what I would like to put on our children’s website at our church so that they can send each other birthday cards etc.
    If there are english instructions could you please email them to me.
    Thank you!

    Gordon


  2. 1

    Pingback: wordpress « wp-greet Version 2.5 « Tuxlog

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

:bye: 
:good: 
:negative: 
:scratch: 
:wacko: 
:yahoo: 
B-) 
mehr...