Is it possible to rewrite URLs in this situation?

I think you are on the right track with .htaccess and rewrite rules What you might consider is a 301 redirect in your .htaccess like this #fancy name redirect here redirectMatch 301 ^/restaurant/london(.*)$ /?category_name=restaurants&locations=london Basically you can then tell people to go to your own friendly URL and they get redirected to the longer one … Read more

Rewriting URLs in WordPress

‘event/industry/(.+)/?$’ The above is the URL that will be rewritten behind the scenes. The brackets create what is known as a “backreference”. ‘index.php?post_type=eg_event&industry=’ . $wp_rewrite->preg_index(1) The above is the actual URL that will be served to the browser. So, http://yourdomain.com/event/industry/abc/ matches the rule “event/industry/(.+)/?$”. The term ‘abc’ becomes a backreference with index 1, because it … Read more

Use single-site install and map entities to subdomains

I hope you are still interested in this question. I did a sub domain mapping to a custom post type using custom .htaccess setting. RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} ^(.+)\.domain-name\.com$ RewriteRule ^$ /index.php?store=%1 [L] Using this setting, each sub domain will map to the store custom post type. http://apple.domain-name.com will be equal to http://domain-name.com?store=apple or … Read more

add new permalink structure from dynamic page

Only way I knowit to do this it’s using this function: /* * Redirects search results from /?s=query to /search/query/, converts %20 to + * @link http://txfx.net/wordpress-plugins/nice-search/ * ======================================= */ function search_redirect() { if (is_search() && strpos($_SERVER[‘REQUEST_URI’], ‘/wp-admin/’) === false && strpos($_SERVER[‘REQUEST_URI’], ‘/find/’) === false) { wp_redirect(home_url(‘/finde/’ . str_replace(array(‘ ‘, ‘%20’), array(‘+’, ‘+’), urlencode(get_query_var(‘s’)))), 301); … Read more