Results 1 to 3 of 3

Thread: htaccess modrewrite SEO

  1. #1
    New user
    Join Date
    07-07-11.
    Posts
    5

    Default htaccess modrewrite SEO

    Hello everybody,

    I try to rewrite links to an old site to the start page of the new Contao-Page in order to safe google rankings.

    The old page-links are all in following syntax:

    /index.php?gui=guiFoo

    I can't get a running modrewrite-Rule. I tried several combinations, for example:

    RewriteCond %{QUERY_STRING} ^gui=(.*)$
    RewriteRule index\.php http://www.foo.org/de/index.html [R=301,L]

    directly after the "RewriteBase /"-statement. That rule doesn't have any effect.

    Any ideas?
    Thanks in advance
    Jürgen

  2. #2
    New user
    Join Date
    10-23-12.
    Posts
    1

    Default Re: htaccess modrewrite SEO

    Have you altered some strings, or you missed up something that result to this...

  3. #3
    New user
    Join Date
    07-07-11.
    Posts
    5

    Default Re: htaccess modrewrite SEO

    I altered something and it seems to work, but I don't understand why?!? I didn't post my solution, because I can't believe that this is really the right way:

    RedirectMatch 301 ^/cnt.php.*$ /de/cnt.php

    RewriteCond %{QUERY_STRING} ^p=agb(.*)$
    RewriteRule (.*) de/agb.html? [R=301,L]
    .. more of them

    RedirectMatch 301 ^/de/cnt.php.*$ /de/index.html

    First mistake was, that i searched for "index.php" in the rule instead of "cnt.php" - now: (.*). Why I need the first and the last line, is a miracle for me, but it works in my case...

Bookmarks

Posting Permissions

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