• Resolved romaniucc

    (@romaniucc)


    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 https://www.domain.com/index.php to https://www.domain.com/

    Any help is much apreciated…

    Thank you,

    Chris

Viewing 10 replies - 1 through 10 (of 10 total)
  • This one should work, replace X with <.

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

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

    Thread Starter romaniucc

    (@romaniucc)

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

    Thank you,

    Chris

    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.

    Thread Starter romaniucc

    (@romaniucc)

    “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

    Michael_

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

    thanks. (sorry for the interruption)

    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>

    Thread Starter romaniucc

    (@romaniucc)

    OK, I’m trying to combine the two above with this:
    ‘Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^domain.org [NC]
    RewriteRule ^(.*)$ https://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

    Thread Starter romaniucc

    (@romaniucc)

    Sorry, mods, please remove the links, I didn’t mean that…

    Sorry

    edited: solved

    Thread Starter romaniucc

    (@romaniucc)

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

    Thank you,

    Chris

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘redirect and 404 – please help’ is closed to new replies.