Reply To: Forum reply redirect URL rewrite issue
Your topic replies URL should be displaying in the format:
http://localhost/sitename/forum/topic/butterflies/#post-158277
When I set my bbPress settings to the same settings you use above these are the URL’s:
Forums base: forum (Note: Default bbPress setting is ‘forums’)
Topics base: topics (Note: Default bbPress setting ‘topics’)
Forum Prefix ticked (Note: Default bbPress setting ‘ticked/checked’)
Forum slug: forums (Note: Default bbPress setting is ‘forum’)
Topic slug: topic (Note: Default bbPress setting ‘topic’)
http://localhost/sitename/forum/forums/butterflies/
http://localhost/sitename/forum/topic/test-topic/
http://localhost/sitename/forum/topic/butterflies/#post-158277
I would try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.
If you have no luck I would read up on the LAMP/MAMP (Linux/Mac, Apache, MySQL, PHP) package you are using on what settings are needed for mod_rewrite to work on your local machine.
There are also a few (and a few broken links here) installing WordPress Locally
https://codex.wordpress.org/WordPress_Installation_Techniques#Installing_WordPress_Locally