WordPress.org

Forums

[resolved] redirect and 404 - please help (11 posts)

  1. romaniucc
    Member
    Posted 10 years ago #

    Hi!
    I changed the template of my wordpress blog and I'm keep seeing this error is my stats, the wordpress is calling /none and it' not found. Can you please tell me how to make a 301 redirect via htaccess? I want to redirect this 7none to the root of my domain.
    Also, I'd like to redirect http://www.domain.com/index.php to http://www.domain.com/

    Any help is much apreciated...

    Thank you,

    Chris

  2. Michael_
    Member
    Posted 10 years ago #

    This one should work, replace X with <.

    #-- Your rewrite
    XIfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ / [L,R=301]
    X/IfModule>

  3. Michael_
    Member
    Posted 10 years ago #

    Oh, just double-red your post. I think my rewrite rule will not work with WordPress since it needs index.php.... Sorry.

  4. romaniucc
    Member
    Posted 10 years ago #

    Thank you, what about redirecting
    http://www.domain.com/none to
    http://www.domain.com/

    Thank you,

    Chris

  5. Michael_
    Member
    Posted 10 years ago #

    The same:
    #-- Your rewrite
    XIfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^none(|/)$ / [L,R=301]
    X/IfModule>

    Where both "/none/" and "/none" are being redirected as it considers trailing slashes as well.

  6. romaniucc
    Member
    Posted 10 years ago #

    "replace X with <"
    That means I should replace all x with < on all code sentences above?
    Sorry, but I really don't know any htaccess...

    Thank you,

    Chris

  7. mdpai
    Member
    Posted 10 years ago #

    Michael_

    how to redirect http://www.abc.com/123 to http://www.abc.com?id=123

    thanks. (sorry for the interruption)

  8. Michael_
    Member
    Posted 10 years ago #

    No, just in XIfModule and X/IfModule. I did not post it as this forum will discard it as it thinks it is invalid HTML code...

    You can use it in the same manner:
    #-- Your rewrite
    XIfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^123(|/)$ /?id=123 [L,R=301]
    X/IfModule>

  9. romaniucc
    Member
    Posted 10 years ago #

    OK, I'm trying to combine the two above with this:
    'Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^domain.org [NC]
    RewriteRule ^(.*)$ http://www.domain.org/$1 [L,R=301]'
    wich is redirecting non www to www
    Unfortunatelly, the server give me error500 (I just placed them all one after another)...

    Please advice

    Thank you,

    Chris

  10. romaniucc
    Member
    Posted 10 years ago #

    Sorry, mods, please remove the links, I didn't mean that...

    Sorry

    edited: solved

  11. romaniucc
    Member
    Posted 10 years ago #

    none of the above work on my unix - apache server, any ideea why?

    Thank you,

    Chris

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags