Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forum seo url #76

Open
SeditioCMS opened this issue Nov 1, 2022 · 0 comments
Open

Forum seo url #76

SeditioCMS opened this issue Nov 1, 2022 · 0 comments
Labels
Milestone

Comments

@SeditioCMS
Copy link

SeditioCMS commented Nov 1, 2022

As an example, I made it for the post on the forum. and the canonical url you added extra is unnecessary.
sed_translit_seourl we are using

<link rel="canonical" href="http://localhost/q/1?aradigim-sonuclarda-spam-siteden-baska-site-cikmiyor" />

Change
$urlpaths[sed_url("forums", "m=posts&q=".$q, "?".sed_translit_seourl($ft_title)."")] = $ft_title;

/*  Forums translation */

$sed_urltrans['forums'] = array(
    /**/
    array( 
          'params' => 'm=topics&s=*', 
          'rewrite' => 't/{s}'
    ),
    /**/
    array( 
          'params' => 'm=posts&q=*', 
          'rewrite' => 'q/{q}'
    ),
    /**/
    array( 
          'params' => 'm=posts&p=*', 
          'rewrite' => 'p/{p}'
    ),
    /**/
    array( 
          'params' => 'c=*', 
          'rewrite' => 'forums/{c}'
    ),
    /**/
    array( 
          'params' => '', 
          'rewrite' => 'forums'
    )
);  
 /*  Forums rewriting */
    array(
         'cond' => '#^/t/([0-9]+)(/?)$#',
         'rule' => 'system/core/forums/forums.php?m=topics&s=$1'
    ), 
    array(
         'cond' => '#^/q/([0-9]+)(/?)$#',
         'rule' => 'system/core/forums/forums.php?m=posts&q=$1'
    ),
    array(
         'cond' => '#^/p/([0-9]+)(/?)$#',
         'rule' => 'system/core/forums/forums.php?m=posts&p=$1'
    ),
    array(
         'cond' => '#^/forums/([a-zA-Z0-9]+)(/?)$#',
         'rule' => 'system/core/forums/forums.php?c=$1'
    ),
    array(
         'cond' => '#^/forums(/?)$#',
         'rule' => 'system/core/forums/forums.php'
    ), 

URL out: http://localhost/q/1?aradigim-sonuclarda-spam-siteden-baska-site-cikmiyor
Isn't this better?

@avego avego added this to the Seditio 180 milestone Jan 11, 2025
@avego avego added the question label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants