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
- Is it possible to get a page link from its slug?
- Need help with add_rewrite_rule
- After server migration only the homepage works
- remove “index.php” from permalinks
- where is permalink info stored in database?
- Changing permalinks gives me 404 errors on nginx
- How do I add /blog/ as a prefix to permalink structure for blog posts, tag pages, etc.?
- Change media item permalink
- Get Permalink without domain (i.e. get relative permalink) [duplicate]
- How does WordPress create URLs that Apache knows about?
- Strange permalink issue: can’t rename /company-2/ to /company/
- Passing and retrieving query vars in wordpress
- Get the current page URL (including pagination)
- Stop WordPress appending `-2` to the end of my url after i change it
- Get default permalink structure from pretty URL’s
- How to get permalink and title from post ID?
- Why is “/page/2/” not working?
- WordPress Permalinks not working in Apache2 Ubuntu 14.04
- Performance of my permalink structure?
- Permalink format: singular or plural
- What is the difference between get_post_permalink and get_permalink?
- WordPress matching URLs with trailing tildes
- Get current URL (permalink) without /page/{pagenum}/
- How does WordPress handle permalinks?
- Pretty permalinks for search results with extra query var
- Get page permalink without wpurl
- How can I get the privacy policy page?
- Can I use REST-API on plain permalink format?
- WordPress slug issue with non-latin characters
- Rewrite Rule for Multilingual Website, Like qTranslate?
- How to get pretty URLs with add_query_arg in permalinks
- Change author permalink
- Creating custom permalink structure for languages
- Hide permalink and preview button and link on custom post
- Custom post type permalink endpoint
- How can I make Capital letter ( upper-case ) permalinks?
- How can I reverse engineer a Permalink to Find the Page?
- Mapping Domains to Permalinks (not multisite)
- How do I set a custom base URL for standard posts?
- Removing Parent Page(s) from Permalink
- Why permalinks work with /index.php/%postname% but not with just %postname%?
- Setting up WordPress with Custom Permalinks and no .htaccess File?
- Getting the Site URL Including the Front Base
- Does WordPress Change the .htaccess File When Updating?
- Using $_GET variables in the URL?
- Removing the redirect after changing a page’s slug
- How to display a public profile page for registered users with custom slug?
- Removing leading zeros from custom permalink structure
- Must slugs be unique?
- Setting 404 page in Nginx
- How to get the clean permalink in a draft?
- How to use relative links on my pages?
- How does wordpress keep track of post id when post id is not used in permalinks?
- How to filter to output of the get_permalink() function
- Stop WordPress from reserving slugs for media items?
- Including category-base in a post permalink results in 404
- How to change ‘with_front” key from an existing custom post type?
- Change slug on post creation
- Does WordPress automatically do 301 redirect if I change permalink
- How can I store page ID in a post instead of other selected permalink?
- WordPress Permalink changes to question mark (?) in URL
- WordPress thinks my custom route is a 404
- Prevent WordPress from abbreviating-long-slugs…-in-the-admin
- Filtering categories in the permalink structure
- Adding another word in front of post url