.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:
- 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
.
- site address (url): change
- copy index.php , .htaccess files in
/blog-ita
, paste them in/website-name/blog
. you need copy, not move. - open index.php file in
/website-name/blog
in favourite text editor , change line saysrequire( dirname( __file__ ) . '/wp-blog-header.php' );
point @ same file in directory wordpress installed. in case should changedrequire( 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
Post a Comment