.htaccess - Url rewriting not working with wordpress unless using [R] -


i have wordpress installation on website on folder blog-ita/. now, i'd add rewrite rule allow accessing website-name/blog/.

i used rewrite rule:

rewriterule ^website-name/blog/(.*)$ blog-ita/$1 

now, works if add [r] tag, otherwise 404 not found page wordpress instead of page wanted see.

how can be? how can make work without [r] flag?

you can follow this guide wordpress wordpress work in different directory wordpress located.

you want install wordpress in blog-ita directory. want url show website-name/blog instead. follow following steps:

  1. go "general" panel in admin section , change/check following boxes, save changes:
    • site address (url): change http://example.com/website-name/blog
    • make sure wordpress address correctly configured htttp://example.com/blog-ita.
  2. copy index.php , .htaccess files in /blog-ita , paste them in /website-name/blog. you need copy, not move.
  3. open index.php file in /website-name/blog in favourite text editor , change line says require( dirname( __file__ ) . '/wp-blog-header.php' ); point @ same file in directory wordpress installed. in case should changed require( dirname( __file__ ) . '../blog-ita/wp-blog-header.php' );. save changes.

from point on, wordpress should available @ http://example.com/website-name/blog/. admin section available @ actual installation directory (/blog-ita/admin).


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -