SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WordPress CMS and URL re-directs - Preview Page error

    Greetings, I have a unique problem I haven't seen addressed anywhere, and I would appreciate any guidance you can give me.

    I designed a website with WordPress 3.4.2. I created the "testing" site at www.stbedesmenlopark.com

    When I went live with the website, we want the main URL to be www.stbedesmenlopark.org So I pointed the .com site to the .org URL.

    The WordPress dashboard is still residing at the .com URL, and when I am editing a "page" and I click "preview page" I get an error message that says "you do not have permission to view drafts". The page is published, not
    a draft, and I am the main administrator with all privileges. This happened right after I re-directed the URL.

    Any ideas on how to guide me?
    Thankyou,
    Last edited by Mittineague; Mar 1, 2013 at 18:38. Reason: OP forgot to turn off auto-link

  2. #2
    SitePoint Addict deadmix's Avatar
    Join Date
    Jun 2009
    Location
    france
    Posts
    205
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    till now i can still access to your .com website.. the Redirect don't seem to work... you can use this on your htaccess file :

    RewriteEngine On
    RewriteBase /

    RewriteCond %{HTTP_HOST} ^(www\.)?stbedesmenlopark\.com$ [NC]
    RewriteRule ^(.*)$ http://www.stbedesmenlopark.org/$1 [R=301,L]
    This redirects both the www and non-www for stbedesmenlopark.com to www.stbedesmenlopark.org

    Goodluck

  3. #3
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Deadmix - thanks for the help.
    I put this information on my .htaccess file, and it did re-route the .com, but now I can't access my WordPress Dashboard, at either .com/wp-admin.php or at .org/wp-admin.php

    My current .htaccess file has this info on it - do I keep any of this code, or replace it with only the code you have above?

    # BEGIN WordPress

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Again - thanks for your help - France - nice, I'm from the US - Michigan - lots of snow now!

  4. #4
    SitePoint Addict deadmix's Avatar
    Join Date
    Jun 2009
    Location
    france
    Posts
    205
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Eyekons View Post
    Hi Deadmix - thanks for the help.
    I put this information on my .htaccess file, and it did re-route the .com, but now I can't access my WordPress Dashboard, at either .com/wp-admin.php or at .org/wp-admin.php

    My current .htaccess file has this info on it - do I keep any of this code, or replace it with only the code you have above?

    # BEGIN WordPress

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    Hello there,

    add just this :

    RewriteCond %{HTTP_HOST} ^(www\.)?stbedesmenlopark\.com$ [NC]
    RewriteRule ^(.*)$ http://www.stbedesmenlopark.org/$1 [R=301,L]
    before the : # BEGIN WordPress

    I just test and i can access the login board from stbedesmenlopark.com/wp-login.php and from the .org also... try again with this trick!

    Concerning the snow here also there is a lot hhhhhhhhhh annoying lol

  5. #5
    SitePoint Guru bronze trophy Slackr's Avatar
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    679
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    If you don't plan on ever using the .com in the live version I would run a change to the URL in the database. This is the same process as when you migrate from a completely different URL and is covered in the wordpress codex. If you rewrite the URL inside the database you won't have to worry about re-writes outside of Wordpress, even if it is occurring at the server level. Internally Wordpress knows what to refer to so you won't get errors. Simple and clean.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •