2

xxx.com.com/front << work retuern

Array ( [mod] => home  )

xxx.com/news-my-seo-title << work return

Array ( [mod] => cat [act] => more [seo] => hiburan-2 )

xxx.com/cat-mycategory-1 << not work return

Array ( [mod] => cat [act] => more [seo] => hiburan-2 )   

i need return like

Array ( [mod] => cat [act] => more [seo] => hiburan [page]=> 2 )

what mistake i made, since this is my first time doing front page job so i need good clean url

by the way this is my .htaccess

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteRule ^front root.php?mod=home [L]
RewriteRule ^/?(news|sch|cat)-([^-].*)$ root.php?mod=$1&act=more&seo=$2 [L]
RewriteRule ^/?(news|sch|cat)-([^-].*)-([0-9]+)$ root.php?mod=$1&act=more&seo=$2&page=$3 [L]

Options All -Indexes
</IfModule>

hope some one could help me, many thank, and if there is link or any thing i can read please give me link. additional info my seo title format like so (dash seperated)

this-is-seo-title

thanks before

cangak
  • 136
  • 10

1 Answers1

0

You can use this .htaccess:

Options All -Indexes
RewriteEngine on

RewriteRule ^front root.php?mod=home [L]
RewriteRule ^/?(news|sch|cat)-(.+)-(\d+)/?$ root.php?mod=$1&act=more&seo=$2&page=$3 [L]
RewriteRule ^/?(news|sch|cat)-(.+)/?$ root.php?mod=$1&act=more&seo=$2 [L]

It's not possible to use [^-]* because you use - in seo title.

Croises
  • 18,570
  • 4
  • 30
  • 47