Yes, you can definitely run it with the two URLs on the same box. The only reason I’ve ever seen against doing this is to avoid getting a duplicate content penalty from search engines.
I’ve never done this on a Windows box, only Linux; however, assuming you can get both URLs to get to the same installation, the rest is platform-agnostic.
Here’s how I do this on my sites (when I need to):
$url = ( false === strpos( $_SERVER['SERVER_NAME'], 'thinkfuture.com' ) ) ? 'http://freedombunker.com' : 'http://thinkfuture.com/cfs';
define('WP_SITEURL', $url);
define('WP_HOME', $url);
That will change all dynamic URLs depending on which url was used to get there. Anything that’s hardcoded (image sources, etc.) will stay the same, but they should all still work.
Related Posts:
- What is the best permalink structure for SEO?
- How to remove dates from existing permalinks?
- Minimal custom permalink structure
- How do I turn off 301 redirecting posts (not canonical)?
- Pretty Permalinks
- Does a parent page’s post_title have to appear in a child page permalink?
- removing index.php IIS 7.5 webconfig
- If I change permalink structures, can I use htaccess to permanantly redirect links?
- Why does the ‘Month and Name’ Permalink Format not Work on my new WordPress Site (running on IIS7)?
- Force wordpress to display page with same url structure as categories
- Media Gallery Images – safe to change permalink?
- SEO: shortening permalinks to five words
- example.com/index.php/%postname is working while /%postname is not working WordPress on IIS6
- IIS 7 Rewrite with parent categories
- Permalink opens attachment instead of page
- Changing permalinks structure without loosing SEO
- Permalinks on Windows IIS not working and web.config breaks site – does wordpress not support windows server now, if so how?
- Redirecting “wrong” but working links to their canonical URL in order to prevent search engine penalties (e.g. /123/ at the end of URLs)
- Page redirect to 404 when set Permalink = “Post Name”
- What happens to the permalink that use %postname% if I change the post name
- home_url on IIS missing permalink index.php
- IIS7.5 URL rewrite pboblem on index page
- Is it possible to change the permalink structure without changing the old permalinks to posts and without 301 redirects?
- Permalink not changing according to post type
- 301 redirects after changing permalinks
- Is it possible to use % sign in post permalinks?
- Remove index.php from url in permalinks over IIS server (web.config)
- On IIS, stop WordPress from resaving my web.config file when I enter the Permalinks config page
- Search and replace post URL’s on page output?
- Permalinks setting raises 500.0 error
- Two urls for one website
- Pages included in another page and duplicate content issues for SEO
- Remove index.php from WP 8.0 install migrated to IIS from Apache (still detecting Apache server)?
- Permalinks is not working in my wordpress setup
- Stymied by 500.5 error for WordPress on IIS 8 / Windows Server 2012
- How does WordPress handle permalinks?
- Get page permalink without wpurl
- Can I use REST-API on plain permalink format?
- How to change ‘with_front” key from an existing custom post type?
- Make post slug have priority over category slug
- Adding anchor to paginate_links + Safari anchor bug
- How to stop permalink redirects for a particular slug
- WordPress Links Not Working After Migration
- Migrating WordPress blog to New Webhosts, something is adding a # and gibberish
- Adding File Extensions to Attachment Page Permalinks
- How to tranform Headlines into linkable permalinks?
- Best way to add internal link in widget
- article pages not displaying on local instance of wordpress site
- breadcrumbs & rel=”nofollow”
- Use Regular Expression to get tag from permalink url during wp_rewrite in generate_rewrite_rules
- Create unique alphanumeric ID on wp_insert_post
- Programatically changing post’s permalink when identical post type is published
- Permalinks not working with Vagrant
- Is there a link parameter that will show me all my published pages?
- Add prefix to page URL based on the page template
- Files rendering adding “.x95527” before file extension [closed]
- Permalink /%postname%/ doesn’t work
- How to change hierarchical page permalinks to be flat
- Permalink structure with $_SESSION variables
- Strange Anchor Tag Behavior (in-page links work, external pages do not) [closed]
- WordPress 3.1 .htaccess contents keep dissappearing?
- Permalink in WordPress loop outputs for each new line
- Freeze child page URLs so parent permalink changes don’t give 404s?
- New custom PHP pages are getting 404s
- How Do I get the author’s page id?
- Adding a prefix to the blog, but only the blog
- Old site posts broken after domain update
- After cloning WP do a subdirectory, I can’t access it
- Moved site, Old links in pages still pointing to old host
- help to remove last trailing slash using add_rewrite_rule
- change WordPress permalinks and redirect new urls 301
- WordPress Permalink Redirect 301
- problem with pagination in custom permalinks
- Problems with permalinks (.htaccess not working)
- Change author permalink using htaccess?
- /%post_name%/ or /%postname%/ in Permalinks?
- Remove international characters from slug – Almost done – Bit help
- WordPress permalink not working on subdomain
- How to construct a dynamic rewrite rule for child pages that passes more than one query var
- Permalink conflict with React Router in subfolder
- Add /blog prefix for all WordPress front end url
- Permalink structure has suddenly changed
- How to experiment with permalink structure on a select number of posts
- In a multisite, how can I get posts from one site and display their permalinks in another site?
- Why does page for hierarchical taxonomy parent term go 404?
- Custom permalink for one category
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- Single.php not loading when permalink only contains date information
- WooCommerce product permalink changed
- Imported posts using wrong domain name
- Is there a way to add slug to home_url on this function?
- Customized author slugs not working with get_author_posts_url method
- Custom WP permalink structure
- 404 error on second page load for child-pages
- region selection
- Redirecting From An Old Permalink Structure
- Include language variable in url
- Is it posible to translate a url prefix?
- Page permalinks are http but show up as https?
- Remove parent product category slug from product_cat url woocommerce