Rewrite or redirect of PHP pages to new rewrited pages

Discussion in 'Apache' started by crodex, Oct 31, 2010.

  1. #1
    I have small site in Joomla 1.0.12 that is migrated to Joomla 1.5
    Now I am trying to rewrite or redirect those pages to new verision and I can't make it even though I read a 15-20 instructions.

    I tried:

    RewriteRule ^/index.php?option=com_frontpage&Itemid=1$ http://domain.com/folder1/frontpage [L,R=301]

    redirect 301 http://www.domain.com/joom/index.php?option=com_content&task=view&id=25&Itemid=45 http://www.domain.com/rewrite-link

    Thank you in advance.
     
    crodex, Oct 31, 2010 IP
  2. gopkris2000

    gopkris2000 Peon

    Messages:
    86
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Please try the following redirect settings in your index.php file.

    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.new-url.com" );
    ?>
     
    gopkris2000, Nov 2, 2010 IP
  3. crodex

    crodex Greenhorn

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    If I get it right that would rewerite any page to front page?
    I even tried that but it didn't work.

    This rewrite stuff is incredbile. I even don't try to make real rewrite with parametaras.
    I am just trying to put redirect for every page in one line. I searched all internet and I could not find a single helpfull tip.

    I found this DOTtamingthebeastDOTnet/articles3/spiders-301-redirect.htm
    REPLACE "DOT" woth "."

    www DOT example DOT com/page.php?id=13



    And I try to make it work in this way

    RewriteCond %{QUERY_STRING} ^option=com_content&task=view&id=2&Itemid=4$
    RewriteRule ^/joom/index.php$ HTTP:// wwwDOTmydomainDOTcom/folder/topic1 [L,R=301]

    LAst line does not have space after ://
    I just don't have permission to post "live" links

    I really don't get it.
     
    Last edited: Nov 6, 2010
    crodex, Nov 6, 2010 IP