Googlebots...

Discuss phpwcms here, please do not post support requests, bug reports, or feature requests! Non-phpwcms questions, discussion goes in General Chat!
Post Reply
sporto
Posts: 160
Joined: Mon 10. Nov 2003, 18:01
Location: USA, Chicago

Googlebots...

Post by sporto »

Just thought people would be interested that Google indexed phpwcms.de site and it seems that phpwcms is not very indexable to Google. If you click on the link below, you'll see that the index page is in Google, but it doesn't find any more content in the rest of the site.

http://www.google.com/search?num=50&hl= ... ent+system

I know there is another thread out there which is discussing ModRewrite, but for the time being, if you are looking into building content and getting it listed on search engines, this may not be the best solution?:?:? I'm just throwing this out there.

Personally, I've found this to be an awesome tool and I can't wait to use it on a site. However, I think a ModRewrite should be a priority (I wish I had skills to contribute time to this). I think a temporary solution would be to turn on ModRewrite in the htaccess file, and provide a few hard coded links on the home page so the bots can follow them? Just a thought.

I do feel uncomfortable :? saying that this should be a priority because I know that this is the product of Oliver, and he's put awesome amount of work into it and made a great product. And I am in no position to tell him or anyone else what to do. But I can post information and people can do with it what they see fit. :wink:

Cheers! :D
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Sorry I have to say. I know what mod_rewrite can do - but I have not yet understand exactly how to use it.

This is what I have understood (but I can't proof it).

Before the mod_rewrite can process files all compatible links have to be created (...phpwcms.de/cms/1,1,0,1,2,3.html) - whether hard coded (but that's what it should not be) or automaticly created by phpwcms. Is this right?

So this is what I think about: After the complete content is rendered phpwcms checks for a setting: mod_rewrite=ON. If so then a preg_replace checks all links ...?id=1,1,0,1,2,3 and converts them into the correct mod_rewrite form.

Is this the possible way?

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
sporto
Posts: 160
Joined: Mon 10. Nov 2003, 18:01
Location: USA, Chicago

Post by sporto »

My understanding of ModRewrite are about at the same level. But what you write makes perfect sense to me. :) Now I assume you would have to include an .htaccess file with the package to turn on ModRewrite. Or is there another way?

Thanks.
photoads
Posts: 4
Joined: Wed 19. Nov 2003, 16:19

Post by photoads »

Hi,

Firstly you have a great CMS in the making here. It took a while but I am getting the hang of it now thanks.

I do not know much about mod re_write but have seen this example on a competitors forum/site

http://www.miraserver.com/urlhack.htm

Not sure if it helps?

Iain
Jens
Posts: 6
Joined: Sat 11. Oct 2003, 14:17

Post by Jens »

Hey together,

the link below in fact should help to solve this issue.
On my webserver I cannot customize the mod_rewrite nor is it installed. Thus I'm going to code an alternative procedure. It's like the link above describes:
1) You have to build a sitemap with hardcoded links but in phpwcms manner - no relative links - also for images, etc.
2) You have to upload a .htaccess file as described in the link with at least the following content:

Code: Select all

  <Files index>
    ForceType application/x-httpd-php
  </Files>
3) Furthermore you have to code a very simple loader.php file that encodes search engine friendly links:

Code: Select all

<?php
////////////////////////////////////////////////////////////////////////////////
// Skript zur Bildung von $HTTP_GET_VARS per URI-String ohne mod_rewrite
////////////////////////////////////////////////////////////////////////////////
// Autor:           Sebastian Röbke <sebastian.roebke@web.de>
// Letzte Änderung: 2001-11-17
////////////////////////////////////////////////////////////////////////////////
// Anwendung:
// Statt Query Strings (index.php?param1=value1&param2=value2) sollen
// Variablenname und -wert Paare an das Skript per URI übergeben werden
// (index/param1/value1/param2/value2).
// Dies hat den Vorteil, dass die Seite durch Suchmaschinen erfasst werden kann,
// da dynamisch erzeugte Seiten normalerweise ausgeschlossen werden.
////////////////////////////////////////////////////////////////////////////////
// Installation:
// Für den Apache muss eine Force-Type Anweisung konfiguriert werden.
// Diese kann in einer .htaccess Datei des entsprechenden Verzeichnisses
// abgelegt werden.
// Der Inhalt dieser .htaccess lautet beispielsweise wie folgt:
//
// <Files index>
//  ForceType application/x-httpd-php
// </Files>
//
// Diese Anweisung bewirkt, dass im beispielhaften Aufruf 
// http://localhost/index die Datei "index" durch PHP ausgeführt wird, ohne eine
// ensprechende Endung vorzuweisen.
////////////////////////////////////////////////////////////////////////////////
// Konfiguration:
// Als einziger zu konfigurierender Wert des Skripts ist der Name anzugeben,
// unter dem dieses durch die oben genannte Apache-Konfiguration erreicht wird,
// um die Parameter des URI ab dort auflösen zu können. In diesem Falle also
// define (SCRIPT_ALIAS, "index");
////////////////////////////////////////////////////////////////////////////////
// Funktionsweise:
// Das Skript zerlegt die SCRIPT_ALIAS folgenden Teile der URI in Name-Werte
// Paare und weist diese als $HTTP_GET_VARS zu. Weiterhin stellt es die so
// gewonnenen Variablen entsprechend der PHP Konfiguration global zur
// Verfügung.
////////////////////////////////////////////////////////////////////////////////
// Beispiel:
// Ruft man /index/param1/value1/param2/value2 auf, so kann man per
// $HTTP_GET_VARS["param1"] und $HTTP_GET_VARS["param2"] auf die entsprechenden
// Werte zugreifen. Weiterhin sind (sofern register_globals = On ist) die 
// Variablen $param1 und $param2 mit den entsprechenden Werten vorhanden.
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Script Alias im URI
////////////////////////////////////////////////////////////////////////////////
define (SCRIPT_ALIAS, "loader");

// Request URI in Array wandeln
$url = explode("/",$REQUEST_URI);

// Position des SCRIPT_ALIAS im URI als Offset für das Query Array finden
$offset = array_search (SCRIPT_ALIAS,$url);

// Gesamten Query als Array erzeugen
$query = array_slice($url, $offset+1);

// Assoziatives Array (Name-Wert Paar) erzeugen
while (list($key,$value) = each($query))
{
    if ((($key+1) % 2) != 0)
    {
        $index_buffer = $value;
    }
    else
    {
        $HTTP_GET_VARS[$index_buffer] = $value;
        // register_globals = On ?
        if (get_cfg_var("register_globals")) $$index_buffer = $value;
    }
}

// Speicher befreien ;-)
unset($url);
unset($offset);
unset($query);
unset($index_buffer);
unset($key);
unset($value);
?>
It's very easy and can be used without any further server requirements. However the only issue is to reach 1).

Jens
rudeboy
Posts: 16
Joined: Wed 19. Nov 2003, 21:19

Post by rudeboy »

hi all

i opened a new howto implement search enginge compatibility thread, with another solution than the above inside: click here to read more :D
greetings marc
Post Reply