phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Mod rewrite for non phpbb CMS software

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » SEO Techniques
::  
Author Message
Darth Pincho
PR1
PR1


Joined: 22 Sep 2006
Posts: 141

Mod rewrite for non phpbb CMS softwarePosted: Wed Aug 29, 2007 8:13 pm    Post subject: Mod rewrite for non phpbb CMS software

Hi, im wondering if i can do mod rewrite for urls in my subdreamer CMS system.

Now my very internal urls look like this:
-http://www.tupincho.net/Lutalyse_(diniprost)/p2_articleid/68

I want to improove over the p2_articleid/68 part. And show the title of the article.

Can i do that without extensive programming?

_________________
Webmaster at:
http://www.tupincho.net
Discussion board at:
http://www.tupincho.net/foro/
Back to top
Visit poster's website
Darth Pincho
PR1
PR1


Joined: 22 Sep 2006
Posts: 141

Mod rewrite for non phpbb CMS softwarePosted: Fri Aug 31, 2007 3:28 am    Post subject: Re: Mod rewrite for non phpbb CMS software

Hi, i have been working a lot to develop this mod rewrite in my CMS system. I take some sripts for other forums and modify them.

Now i have a testing server. But i really cant make rewrite rules in .htacces to work.

My idea is to automatically redirect the people visiting the old urls to the new urls (static ones)

Now my test page reconizes both urls, but this is a duplicate page. I want to do 301 redirection.

for example:

-http://www.solucionesinformaticasrj.com/index.php?categoryid=8&p2_articleid=5

being redirected to:

-http://www.solucionesinformaticasrj.com/TEST_CATEGORY/repeated-title-a5.htm

how can i do that? im triying with this, and doesnt work:
Code:
RewriteRule ^.*-a([0-9]+)\.html$ /index.php?p2_articleid=$1 [R=301,L]


Obviously there is a problem with the category. For example category with id 8 is called TEST_CATEGORY. But to me is impossible to know the name of the category only having the id without doing a query to the database.

How do you achieve to get the post title using only the id at the htacces?

my actual .htaccess file is:
Code:
Options All -Indexes
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

# PAGINATED ARTICLE
RewriteRule ^.*-a([0-9]+)\.html$ /index.php?p2_articleid=$1 [R=301,L]

_________________
Webmaster at:
http://www.tupincho.net
Discussion board at:
http://www.tupincho.net/foro/
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Mod rewrite for non phpbb CMS softwarePosted: Sun Sep 02, 2007 12:38 pm    Post subject: Re: Mod rewrite for non phpbb CMS software

Well, your rewriterule does work, since your rewritten URL do work.

To HTTP 301 redirect, you can either proceed kind of the same way the zero duplicate does, eg redirect from the csm script, as soon as all the required infos are know, or as you started too, using a script, but you'll need to query the appropriate information to be able to match the requested URI with the one attended.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » SEO Techniques
Page 1 of 1

Navigation Similar Topics

Jump to: