Remove '/blog' slug on root blog.
-
Dear WordPress Support Forum:
Thank you indeed for the work you are doing.
Being unable to find a way to replace the ‘/blog’ slug in root domain, I am using a cron job to update the rewrite rules as work around (‘/blog’ to ‘/en’).CRONJOB BASH SCRIPT
if [ -x "/usr/bin/mysql" ] ; then echo ' Update Rewrite Rules' >> "${SCRIPT_LOG}" echo "/usr/bin/mysql -u${DB_USER} -p${DB_PASSWORD} ${DB_NAME} < ${SQL_REWRITE_RULES}" >> "${SCRIPT_LOG}" /usr/bin/mysql -u${DB_USER} -p${DB_PASSWORD} ${DB_NAME} < ${SQL_REWRITE_RULES} fi
SQL QUERIES (${SQL_REWRITE_RULES} file)
UPDATE bb_options SET option_value=replace(option_value,'blog/','en/') WHERE option_name = 'permalink_structure'; UPDATE bb_options SET option_value=replace(option_value,'blog/','en/') WHERE option_name = 'category_base'; UPDATE bb_options SET option_value=replace(option_value,'blog/','en/') WHERE option_name = 'rewrite_rules';
Just wondering if this parameter can be set in wp-config.php, so no workaround would be required.
Very gratefully,
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Remove '/blog' slug on root blog.’ is closed to new replies.