Apache Mod_Rewrite not being applied correctly
-
I am trying to get a rewrite rule to work on a Multisite setup but with no luck. Here is what I need the rule to do:
https://county.asystyoutech.net/business-directory/25/administration/
to this:
https://county.asystyoutech.net/departments/administration/
Here is my RewriteCond and RewriteRule:
RewriteCond %{HTTP_HOST} website.com
RewriteRule ^business-directory/.*?/(.*?)(/.+?)?$ /departments/$1$2I have the rule added to httpd-app.conf
I am logging the rewrite_mod output to my error_log in apache. I am monitoring the log file as I hit URLs on my site that need re-writing. I can see where the pattern from my rule is applied but nothing else happens after the application. Here is an excerpt from the log file.
applying pattern ‘^business-directory/.?/(.?)(/.+?)?$’ to uri ‘wp-content/plugins/business-directory-plugin/assets/css/dnd-upload.min.css’, referer: https://county.asystyoutech.net/business-directory/54/building-inspector/
pass through /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/business-directory-plugin/assets/css/dnd-upload.min.css, referer: https://county.asystyoutech.net/business-directory/54/building-inspector/
strip per-dir prefix: /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/business-directory-plugin/vendors/select2-4.0.5/css/select2.min.css -> wp-content/plugins/business-directory-plugin/vendors/select2-4.0.5/css/select2.min.css, referer: https://county.asystyoutech.net/business-directory/54/building-inspector/
applying pattern ‘^index\.php$’ to uri ‘wp-content/plugins/business-directory-plugin/vendors/select2-4.0.5/css/select2.min.css’, referer: https://county.asystyoutech.net/business-directory/54/building-inspector/
strip per-dir prefix: /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/business-directory-plugin/vendors/select2-4.0.5/css/select2.min.css -> wp-content/plugins/business-directory-plugin/vendors/select2-4.0.5/css/select2.min.css, referer: https://county.asystyoutech.net/business-directory/54/building-inspector/I am testing the rewrite rule with this tool and the output is what I am expecting.
https://htaccess.madewithlove.be?share=e001da82-cf80-54a6-a34a-e943f1519700
I have searched through everything I can find on this topic specific to apache and wordpress but haven’t found anything that gets me closer to a solution. Any suggestions on what might be wrong?
I have posted this to the Bitnami support forum and they directed me to post here and see if someone on the WordPress forum could offer help.
- The topic ‘Apache Mod_Rewrite not being applied correctly’ is closed to new replies.