Support » Installing WordPress » htaccess redirect question

  • I think i alreadz know the anser to this one, but just to make sure.
    I have 2 domains, one ( that is where the hosting space is , and the second, ( where there is only name with redirect.
    Both on the same machine.
    Is it posssiable (with mod_rewrite for example) to put all the files on (where the hosting is) but when people go to the website (and search engines for SEO) will actually see , and that all the posts will also be (and pages etc..) so actually people will digit, will be phisically redirected to, but the permalinks, seo etc will stay ???

Viewing 6 replies - 1 through 6 (of 6 total)
  • — duplicate post deleted —

    If both of the domains are on the same server, the easiest solution is to change the DOCROOT of domain02 to point to the directory where domain01 is serving from.

    WordPress keeps it’s URL in the database. Where wpdb=WPDataBase, my installation keeps the records in:
    wpdb.options.optionname “siteurl”
    wpdb.options.optionname “home”

    Additionally, the admin area uses a lot of POST methods, that may break if you try to cloak domain01. There’s a lot of docs on how to move a WP installation if you search the codex and the forums.

    Thanks for your reply..
    What I am trying to achive is not exactly transfering the domain (which I know how to do), but to BUILD a new web inside a new domain, but having all the traffic redirected from domainname01 to domainame02, but having all people (and search roots) see domainname01 , even if the site is on domainname02.
    If I do a simple redirect, the traffic will arrive, but the URL will always be of domainname02, or not ?

    Simply redirecting from domain01 will change the URL. See for details.

    I’ve never tried to mirror or cloak a domain using WP. With that caveat, I don’t think it would work via DNS because of the POST forms and softcoded URLs in the database. I don’t think it would work via redirects or rewrites either, for the same reason.

    Give it a try and let us know how it works.

    Your best bet would probably be to create an invisible frame at domain01 and load domain02 into it, which will work for most human visitors but break SEO. might help you achieve what you’re looking for.

    krembo99, there is malware attached to the site that your user name is linked to.

    yes, I know, I have removed it , Thanks.
    My server was hacked a while ago, should be ok now (until the next hack ..)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘htaccess redirect question’ is closed to new replies.