finally I completed, using this below hook
mod_rewrite_rules
function output_htaccess( $rules ) {
$new_rules = <<<EOD
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(\w+)$ ./index.php?id=$1
EOD;
return $new_rules . $rules;
}
add_filter('mod_rewrite_rules', 'output_htaccess');
Related Posts:
- htaccess rewrite conflict with wordpress rules and ssl
- Rewrite /?rest_route=/ link to /wp-json/ without changing default permalink structure in apache
- WordPress site displaying 404 for any page apart from index
- .htaccess Rewrite URL WordPress
- different child theme for subdomain
- Struggling with add_rewrite_rule
- .htaccess rewrite rule puzzle
- need a help for modify .htaccess rule [closed]
- Best way to redirect site in subdirectory to root?
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- TimThumb & htaccess : clean url
- What to write in the htaccess in order to detect browser language and point accordingly?
- want to rewrite an URL in wordpress
- How to turn this .htaccess rule into a dynamic rule with add_rewrite_rule, et al?
- htaccess problem not being able to overwrite previous rules
- add_rewrite_rule to remove /category/ from permalink
- Relative links stop working after moving wordpress site from hosting to localhost
- htaccess redirect throws an error: PHP Catchable fatal error: Object of class WP_Error could not be converted to string
- Rewrite Rules not redirecting rewrite
- Rewrite URL in address bar for a specific page [closed]
- How do I reset a rewrite?
- Rewriting subfolders to specific parent folder in WordPress
- Redirect default pagination page to template page’s pagination
- Remove subdirectory from links
- Rewrite rules and maintain URL
- WordPress URL not working?
- .htaccess rewrite rule stopped working for wordpress site after moving server
- Improve wordpress security by hiding non public resources
- SEO Friendly URLs for my plugin categories
- Remove year and month in URL using .htaccess
- How to add .htaccess code through a function?
- WordPress keeps writing rewrite rules to .htaccess
- WordPress Rewrite
- Unable to access WP admin
- Move wordpress to folder without changing urls
- Rewrite rule never matching
- Using WordPress only for the backend, and using AngularJS as a frontend
- Two domains on one WordPress Installation
- Protect Upload Folder Files With Ampersand Problem
- RedirectMatch and Redirect interfering with each other
- .htaccess and WordPress Admin Bar
- Blocking access to wp-login via htaccess not working
- How to Redirect huge numbers of URLs to another URLs?
- Giving WordPress its own subdirectory – nginx
- Cannot mask WordPress page URL using .htaccess
- How can I make an htaccess file on a Mac? [closed]
- Rewrite rule to load images from production does nothing
- Restricting user login by IP address
- WordPress overrides custom 404 page with it’s own
- New installation can’t be found due to htaccess of the original non-WordPress site
- remove query arg from url after set query
- Case insensitive header params for API request
- 301 Redirect domain Sub-folders to Subdomain subfolder
- Drawbacks to using Options -Indexes
- My WP_options db rewrite_rules Does Not Work
- Override 404 page with htaccess
- Htaccess Rewrite reverts to default .htaccess file
- what could cause the htaccess file to be modified?
- Disabling direct access to images using .htaccess
- change permalink structure with htaccess without SEO impact
- Changed pagination URLS to use p= instead of paged=
- Site in subfolder – all pages work except home
- Can’t upload .htaccess after editing in notepad
- Directing subdomain to main domain and keeping the subdomain format with .htaccess
- Remove /sites/25/ from image URLS
- How disable canonical redirect wp-signup
- Forcing HTTPS with WordPress on AWS
- WordPress Example Code for Blocking Referrer Spam
- How could a .htaccess with authentication suddenly appear or change?
- Force non-ssl on WordPress RSS feeds in htaccess, using cloudflare
- Protect wp-login, but get an internal server error
- Local wordpress install only shows home page, all other pages Not Found
- WordPress is rewrite my htacces file. I adding a font rule
- Redirect within wordpress template/plugin
- Redirect wrong links WordPress
- Accepting special characters in querystring
- Centos 7.2 wordpress on going to /admin shows Forbidden You don’t have permission to access /wordpress/wp-admin/ on this server
- Multiple wordpress installations on same server
- WordPress rewrite rules not working
- Cannot access subdirectory subpages
- WordPress constantly running out of memory
- Custom url structure – pages under a custom post type
- How can I create a smarter .htaccess file that will add a directory?
- Rewrite rule that wp-login.php?action=register is left alone
- .htaccess found in every folder
- Help with htaccess querystring rewrite
- How do I properly redirect requests to WordPress subdirectory?
- .htaccess to redirect to a wp page
- Leverage browser caching
- using htaccess to check for cookie on permalink then conditionall rewrite with query parameter
- How to direct users to a subcatalog
- How to block wordpress admin by htaccess
- htaccess conflict between WordPress and password protected subdirectory
- Using subdomain as primary domain
- Apache rewrite rules and wordpress problem
- Add-on domain works in WordPress but links still lead to subdomain
- In a subdomain network, what .htaccess settings can I use to have WP ignore requests to one subdomain?
- htaccess rule to ignore specific subdomain [closed]
- Forward blog requests to another URL
- WP-Include rewrite directory