title: Wordpress URL not working
body: <p>I am using wordpress, i have some URL issue.</p>
  
  <p>My current URL is IP address on server: <a href="http://www.192.10.1.22/states/?q=ohio" rel="nofollow noreferrer">http://www.192.10.1.22/states/?q=ohio</a></p>
  
  <p>I want URL :<a href="http://www.192.10.1.22/states/ohio" rel="nofollow noreferrer">http://www.192.10.1.22/states/ohio</a></p>
  
  <blockquote>
    <p>i used following code in functions.php file and it's working in my
    local but when i upload in cpanel then it's now working given me error
    page not found.</p>
  </blockquote>
  
  <pre><code>function custom_rewrite_rule() {
        add_rewrite_rule(        
              'states/([^/]*)/?',        
              'index.php/states/?q=$1',        
              'top' );
      }
  
      add_action('init', 'custom_rewrite_rule', 10, 0);
  </code></pre>
  
  <p>i also used below code.</p>
  
  <pre><code>add_rewrite_tag('%states%', '([^&amp;]+)');
  global $wp;
      $wp-&gt;add_query_var( 'q' );
      add_rewrite_rule(
          'states/(\d*)$',
          'index.php/states?q=$matches[1]',
          'top'
      );
  </code></pre>
  
  <p>i also update permalink and apache mode_rewrite is also on.</p>
  
  <p>so how could i solve this issue?</p>