Permanent redirect /index.htm to /wordpress

Discussion in 'Apache' started by dunning72, Jan 4, 2008.

  1. #1
    I would like to ask for help permanently redirecting the index.htm in my root to Wordpress blog which is a sub-domain.

    http-://example.com/index.htm -to- http-://example.com/wordpress

    I have tried several things, but can't seem to get my arms around it. Thanks in advance.
     
    dunning72, Jan 4, 2008 IP
  2. dunning72

    dunning72 Peon

    Messages:
    201
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The code from the post"Wordpress and 301 redirect" worked for me.

    RewriteEngine on

    RewriteCond %{HTTP_HOST} ^example.com [NC]
    RewriteRule ^(.*)$ http://www.example.com/wordpress$1 [L,R=301]

    I thought I tried something similar. Oh, well, on to the next challenge.
     
    dunning72, Jan 4, 2008 IP
  3. dunning72

    dunning72 Peon

    Messages:
    201
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I would also like to exclude /phpbb3 from being redirected. Currently my URL's come out h.ttp://example.com/wordpress/phpbb3 How do I remove the "wordpress"?

    I have tried this, but then I get a server error. Any thoughts?

    RewriteEngine on

    RewriteCond %{REQUEST_FILENAME} !^forum/?$
    RewriteRule (.*) http://domain.com/blog/$1 [R=301,L]
     
    dunning72, Jan 4, 2008 IP