how to change url in wordpress using htaccess menualy without using parmalinks

I have generated this type url in my web site.

 http://example.com/?page_id=30

Change in to like this type

Read More
  http://example.com/features/

So, how can i change it in wordpress htaccess using.
This web site is working in to local host perfectly good.But not live.

Related posts

2 comments

  1. You could do it with some 301 redirects in your .htaccess. It could look like:

    # Only do rewriting if the needed Module is available
    <IfModule mod_rewrite.c>
    
    # Enable URL rewriting
    RewriteEngine On
    
    # Change this path, if your installation is located in a subdirectory of the website root.
    RewriteBase /
    
    #Following Block for every page you want to redirect
    RewriteCond %{QUERY_STRING} ^page_id=30$
    RewriteRule ^index.php$ http://example.com/features/? [R=301,L]
    
    RewriteCond %{QUERY_STRING} ^page_id=31$
    RewriteRule ^index.php$ http://example.com/features-too/? [R=301,L]
    
    RewriteCond %{QUERY_STRING} ^page_id=32$
    RewriteRule ^index.php$ http://example.com/features-again/? [R=301,L]
    
    # and so on... 
    </IfModule>
    
  2. As per your comment you might getting 404 error after change permalink structure from wordpress admin because I think you are missing mod_rewrite in .htaccess ,

    Please add following code in your root .htaccess file and then change permalink from admin panel :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    

    If you have already added above code even though getting error then do below setting :

    1 – Go to apacheconfhttpd.conf file

    2 – Find for line #rewrite_module modules/mod_rewrite.so

    3 – Remove # from above line , Save file and restart your server.

    I am sure it will work.

Comments are closed.