not sure if this is a problem for you still or not, but if so I noticed a few issues. First off, your domain wasn’t set to be case-insensitive [NC]. Second, your RewriteRule regex has a character class ending with a dash. This needs to start with a dash. Third, your rule sends the request to index.php, which means index.php needs to know how to handle the request. If you want to redirect, that’s different. Give this a whirl and let me know how you make out:
RewriteCond %{HTTP_HOST} ^domainXYZ\.com [NC]
RewriteCond %{REQUEST_FILENAME} !wp-admin
RewriteCond %{REQUEST_FILENAME} !activity
RewriteCond %{REQUEST_FILENAME} !members
RewriteCond %{REQUEST_FILENAME} !groups
RewriteRule ^([^/]+)/?$ http://domainXYZ\.com [L,R=301]
Cheers~
Related Posts:
- How to create custom URL routes?
- Masking wp-content/themes/name/images to just images directory using htaccess
- How to change default page slug?
- Mod_rewrite delete parameter in 301 Redirect
- Sub domain redirection to taxonomy
- Need to make a php file inside theme accessible via url
- Evaluating a external rewrite rule before internal wordpress rewrite rule
- Map alt domain to specific section of website w/o MU
- Using custom mod_rewrite without breaking wordpress permalinks
- Rewrite rule to load images from production does nothing
- Rewrite Rules Are Redirecting and Not Passing VARs
- WordPress rewrite rules don’t need ^?
- How to remove parent section from attachment URL?
- Adding rewrite rules directly to .htaccess file
- Custom rewrite not working
- WP is ignoring .htaccess rewritten URL
- a one-off rewrite rule
- Rewrite wp-login.php URLS to static pages?
- Change htaccess to redirect to index.php in subfolder
- Rewrite custom post type URL parameters
- How to remove wordpress directory slash
- Rewrite URLs – Custom Post Type – Post Slug, Taxonamy Slug
- URL Rewriting for PHP script on an image URL
- Change pagination url format
- How to redirect specific URL to Subdomain
- Rewriting “pretty” blog category URL with htaccess / add_rewrite_rule() causes 404 page
- How to rewrite wordpress urls with index.php in them
- Custom Rewrite rule to captured post (rewrite rule to rewrite rule)
- Map secondary domain to other’s virtual subfolder
- URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”
- Changing URL scheme, mod_rewrite not helping
- Localize URL bases
- How can I create custom URL routes?
- force www rewrite if wordpress put in a folder
- Rewriting a date hierarchy into a ‘yyyy-mm-dd’ slug
- How do I make WordPress revise an .htaccess file a certain way?
- modify URL with mod_rewrite or hook
- How to change an existing wordpress page rewrite rule?
- Pretty URL via Rewrite
- ModRewrite not working properly
- Custom Rewrite for Profiles
- Function to rewrite URl in WordPress
- help with rewrite_tag and rewrite_rule for custom page GET variables [duplicate]
- Can’t get pretty permalinks to work without index.php
- How to redirect a virtual page (e.g. /blog) to the home page?
- Generated URLs don’t reflect accurate URLs.
- Please give me the rewrite rules for my ugly urls
- Add rewrite endpoint and .htaccess
- Is it possible to use the same slug structure for a taxonomy and for some pages?
- htaccess – Redirect to subfolder without changing browser URL
- Using custom/dynamic “slug” for a page
- How do I remove a rewrite rule?
- Use subdomain for certain urls
- Rewrite URL – how to do a SEO-friendly Unicode custom URL?
- Can I call a custom plugin with a direct URL
- Custom slug in front of search URL
- Display posts with author in the url with custom post types
- Clash of the rewrites
- how to use a different domain/subdomain for authors/catagories on single site?
- Query Vars for the Homepage?
- Disable wordpress pagination URL rewrite for specific page
- How to use Post Custom Metadata in Post Titles and Post Permalinks
- Using WordPress with Apache behind an nginx reverse proxy
- How do i change the search permanent links
- add_rewrite_rule() not playing nice with child pages
- Appending numbers to url do not break the link
- Custom rewrite rules are sending everything to index.php
- WordPress Network on IIS7/SQL Server – Rewrite Issues
- Custom comments
- How to Change Author Posts URL
- WordPress 404 unless there is a space in url
- Add .html extension to only one page in my WordPress site
- Migrating a page to be an article
- How to get “extended” path info from URL in a plugin
- Custom URL routing based on cookie value
- Rewriting rules: difference between ‘init’, ‘rewrite_rules_array’, ‘generate_rewrite_rules’?
- Multiple Permalinks for Same Post
- How to perform a query at the URL?
- url rewriting for most recent post
- Is there a way to create alias without using htacess, permalinks or delving into code?
- Remove “/page/1” from the URL
- hard flush_rewrite_rules() not regenerating .htaccess
- Nginx rewrite rules
- Remove base slug in permalinks of hierarchical custom post type
- Use custom template on certain URLs
- custom template rewrite
- add_rewrite_rule fro html to another url not working
- How do I redirect to a non-www version and make it the default URL?
- WordPress redirects non-existing url to existing ones – how to disable
- How to create a profile page for specfic / custom user role members?
- How to add a custom redirect rule for Post as subdomains?
- Trying to find the location of a rewrite of the URL query
- “View post” leads to odd URL
- Redirect HTTP to HTTPS for all sub domains (blog posts)
- Get url param no longer works when using add_rewrite_rule
- How to use add_rewrite_rule in subdomain
- How to create a URL Rewrite rule?
- How can I redirect product url to category then product url?
- adding custom controller called by front-end
- rewrite attachment url with attachment title