SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2004
    0 Post(s)
    0 Thread(s)

    Question SEO Help please, with link going to correct SEO path

    I need som SEO help here, I am using joomla with custom coded added.

    But when we trun on our SEO feature everything is good, but our links are not going to the correct path.

    Here is an example of NON-SEO link
    When we turn on SEO
    The link is
    But we need it to REad
    We've tried

    Redirect /community/$1/photos /component/community/$1/photos

    WE've also Tried
    RewriteRule ^component/([a-zA-Z0-9_-]+)/$1-$2/([0-9]+)\$1&Itemid=$ [NC]

    Still nothing works, it just remains to the default, SEO change that is not correct, please HELP

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    19 Post(s)
    3 Thread(s)

    What you REALLY need is help with mod_rewrite. However, what you're attempting needs to be "mapped" and you've not made it easy (changing Itemid numbers et al). If you have a look at the tutorial linked in my signature, you'll understand why.

    Comments on your code:

    Target =

    URL =

    How do you get com_community from community, where does profile come from, is 65 the userid and where does sexyapp/photos get redirected to?

    Quote Originally Posted by Dan
    No, actually, you need it to read com_community (components/community), you should hide userid- rather than identify the key for username and, again, where does photos tell Apache how to get Itemid=100?

    Quote Originally Posted by Dan
    RewriteRule ^component/([a-zA-Z0-9_-]+)/$1-$2/([0-9]+)\$1&Itemid=$ [NC]

    You cannot put $1 or $2 in the regex of a RewriteRule and your \ is escaping a space which is not allowed (outside a character range definition. You DID get the position of the hyphen correct in your first character range definition, though, so you're ahead of many mod_rewrite newbies.

    The redirection doesn't need to be external ( but the Itemid's value is missing. Further, the No Case flag is inappropriate for a RewriteRule (because the {REQUEST_URI} string is case sensitive ... and you've used [a-zA-Z] which is the correct way to deal with that).

    WARNING: CMS's create their own mod_rewrite and use modules to reformat your links so the modules can read them and fetch the correct record(s) from your database. Messing around with mod_rewrite will change this and likely collapse your CMS website ... if you're not both knowledgeable and very careful.


    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts