redirect wordpress calls to a page

2019-08-15 19:19发布

I'm not really sure what is the best way to do this. Say you have set up a page like so:

www.myblog.com/page1

Is it possible to, specify that the request to any of the subpages under page1 be redirected to a single page? Say if I had page1.php as one of my pages, any URL that is prefixed with:

www.myblog.com/page1/...

wordpress would use that file to generate the page.

Basically, I have some custom content that I want fetched with php, and it depends on which subpage is being loaded. The format of the custom content is always the same, only the 'arguments' differ. Is there a way to do this within Wordpress? And if not, where should I should I start looking to implement this?

Thanks

1条回答
欢心
2楼-- · 2019-08-15 19:35

try modifying .htaccess file and rewriting url so all requests for /page1/page2 will be rewrite to /page1=?page=page2 or something like that

查看更多
登录 后发表回答