Have a look at the Permalink settings in the admin, you should be able to achieve what you want there. Here is a link to the Permalink Codex
something like /%post_id% should do the job, if you select the ‘Custom Structure’ option.
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
- 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 ^?
- 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?
- Need help with simple rewrite rule (shouldn’t this be easy?)
- 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
- 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?
- 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?
- Does WordPress keep track of a post’s URL history and provide automatic redirects?
- How to retrieve $_GET variables from rewritten URLs?
- Dynamic Endpoints
- Rewrite url for custom post type
- add_query_vars and add_rewrite_rules
- WordPress URLs without posts
- Need help with rewrite_rules_array
- Hijacking the URL for filtering
- How to change ?lang=cn into /cn/
- custom htaccess rewrite rule for page
- Change URL for Blog?
- Sorting archive pages with “pretty” URLs?
- add_rewrite_rule again
- How to change page URLs to “www.site.com/page” instead of “example.com/blog/page” but keep post URLs as “example.com/blog/post”?
- Add_query_arg + two times the same argument?
- Redirecting all old links from previous EE site to new WP site in one go?
- Interesting Custom Post Type Slug with Taxonomy and Custom Field
- Two “.htaccess” Files Located in Different Directories?
- Removing the post format (type) slug
- Redirect all posts urls from without .html to .html
- WordPress rewrite rules for state and city
- Single Redirection Rule for Pages and Archive links
- Home page with Polylang redirects to other page [closed]
- expecting 404 but redirecting to post with url subdirectory in post title
- Custom user profile URLs
- Rewrite of URL with ‘[‘ ‘]’ or ‘(‘ ‘)’ as literals
- Define orderby in url
- Changing RSS feed URL structure
- Preserve Domain Alias
- Mobile version issue when domain forwarding with masking
- How to building pretty URLs to reflect category hierarchy?
- WordPress Rewrites – How can I pass a variable to Custom Post Type?
- Need to add rewrite rule that adds in additional information about the post to url
- add_rewrite_rule is redirecting instead of rewriting url
- Rewrite rules automatically for pages using specific template
- Add language prefix to permalinks
- Attachment page gives 404 if user not logged
- Rewrites: .htaccess or wp_rewrite for bulk 301 changes?
- How to change the Author Slug from Username to Nickname and deal with Special Characters
- htaccess rewrite ignored
- Trouble with question mark in rewrite rule
- Weird characters behind every single link and images
- How to mask url of a specific page without affecting seo [closed]
- Adding Theme File for Non-WordPress Content
- URL structure for dynamic content broken since upgrade to 5.8
- I have a problem with WP_Rewrite
- 404 Rest Route not found – when serving behind “proxy”
- How to use a capture from a rewrite rule inside a php file (like single.php)?
- url rewriting on custom post type
- rename author base from author url in wordpress not working
- mysite.co.uk/wordpress redirects to mysite.co.uk?
- How to change search url produced by ‘s GET method?
- Hide / rewrite download link
- add_rewrite_rule not working with custom variables