This is going to sound crazy, but the following worked… I put the content in the following directory:
/var/www/myexamplesite.com/public_html
(and created log/ as well)
Along with the following entry in httpd.conf
<VirtualHost *:80>
ServerAlias www.myexamplesite.com myexamplesite.com
DocumentRoot /var/www/myexamplesite.com/public_html
ServerName www.myexamplesite.com
# Log file locations
LogLevel warn
ErrorLog /var/www/myexamplesite.com/log/error.log
CustomLog /var/www/myexamplesite.com/log/access.log combined
<Directory /var/www/myexamplesite.com/public_html>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
</Directory>
</VirtualHost>
That’s it!
Related Posts:
- Including category-base in a post permalink results in 404
- WordPress thinks my custom route is a 404
- Page preview is shown, updating page gives 404 error
- Permalinks 404 error with HTTPS host
- Visiting posts results in 404 errors after host migration
- 404 permalink errors on Pages only
- WordPress pages and posts are redirecting to server IP address instead of domain URL [closed]
- how to set up wp in folder within static website?
- The requested URL was not found on this server [closed]
- WP-e-commerce (getshopped) – Annoying permalink issue [closed]
- MySQL-inserted custom taxonomy term lead to 404, flush rewrites doesn’t help
- Folder Name and Category Name WordPress
- Although rewrite engine is on, I get 404 not found on every page
- Need help with add_rewrite_rule
- How does WordPress create URLs that Apache knows about?
- How to get pretty URLs with add_query_arg in permalinks
- How to add a custom URL placeholder to author archives?
- permastruct for custom post type not working in one of four cases
- Remove parent slug for child pages
- Nice RSS Feed URLs for each custom post type
- Change the custom post type permalink
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- Auto 301 to full post permalink? (using /posts/%post_id%/%postname%)
- Rewrite url / permalink for default archive – yearly / monthly
- removed index.php now all pages 404
- WordPress on VirtualBox – no pretty permalinks
- Permalinks, Rewrites, Get Variables, Oh My!
- How to Modify Existing Rewrite Rules?
- Image Attachment Url Rewrite
- After moving from subdirectory to home, home page does not display
- Rewrite Page with a slug before page name
- Can’t get rewrite rules working
- permalink changed, now getting 404 for every pages
- Permalinks keep reverting to 404 unless I re-save them
- When is it a good idea to build a permalink structure from scratch?
- If the only permalink setting is %postname% what happens in the case of old duplicates?
- How to reset canonical URLs / fix redirect loop
- Permalinks not working Apache + CentOS 7
- Permalinks okay some pages but 404 error on others
- AWS WordPress Install – pages/posts 404 on restart until updating permalinks
- Permalinks by page/post name returning 404
- Custom taxonomy in URL showing 404
- remove sub-category of Custom Post Type from permalink structure
- WordPress Permalinks & Nginx Rewrite Rule Not Working
- Changing the post date without causing 404 error
- Rewrite rule for a query string
- WPML – how to get the permalinks to display also the default language
- 404 Error Problems with sCategory Permalink plugin
- Why does the ‘Month and Name’ Permalink Format not Work on my new WordPress Site (running on IIS7)?
- Need to add trailing slash to all internal links relative and absolute
- Permalink structure between 2 custom post types and a taxonomy
- Permalinks stopped working – NO update, mod_rewrite enabled, .htaccess not touched
- Disable date based archives for all categories except one
- Resolve 404 on posts without category
- How can I emulate permalink behaviour on static pages
- Remove parent page from url
- How do I change the permalink structure without getting 404s?
- how to prefer static page if it exists over wordpress page
- 404 on internal pages, in all sites in my local server
- Post type Permalink
- add_rewrite_rule – Page Slug from “/foo-bar/” to “/foo/bar/”
- Access or edit custom generated permalinks with WP_Rewrite
- optional parameter in permalink structure
- Rewrite rule not passing variable
- “set_front” => false on custom post type breaks wp_list_categories links [closed]
- Problem with special character WordPress
- All in One Seo and Permalinks
- remove SLASH on single_post but KEEP on categories and parent pages
- WordPress keeps removing query var from the URL
- Custom structure permalink preventing 404
- How can I access to the same post-type “page” from multiple different urls?
- Multiple URL rewrite rules and get every prams
- Using a template file for a specific custom URL
- I have a 404 error on all my pages! What do I do?
- Extra url paths as variable
- Passing parameter through permalink structure
- Add word to permalinks does not transform the urls
- Add slug to default post permalinks ONLY
- 404 error on published page with specific permalink
- My permalinks for all pages and posts now include old page titles as parents/categories
- WordPress Pagination Custom Rewrite Rule for Pages
- How to change URL of my pages?
- How can I get .html URL suffixes in permalinks?
- rewrites and custom links in page need help with add_rewrite_rule
- Change the permalinks structure
- Converting WP Page to use full explicit paths?
- How to create an IIS7 re-write rule for a single category
- Page_link change
- All pages lead to home
- Remove index.php from WP 8.0 install migrated to IIS from Apache (still detecting Apache server)?
- Update permalinks
- Losing the original URL when using add_rewrite_rule
- Custom permalink variable on single post
- URL to an image in a post is changing when permalink is set to custom. Can I avoid this?
- Creating complex URLs with WordPress permalink structure
- How to get the perfect WordPress, WooCommerce, Custom Post Type pretty permalinks?
- WordPress keep redirecting me to random URLs
- Blog url disappears
- Settings > Permalinks – mod_rewrite ineffective if expression not preceded by /index.php/
- Blog URL Structure – Multiple Taxonomies