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

How to create a 301 redirect that doesn’t apply to subsites

You’ll need to use mod_rewrite (RewriteRule and RewriteCond) directive(s) instead, as opposed to a mod_alias Redirect directive, in order to check the requested Host header. For example, try the following near the top of the .htaccess file, before the # BEGIN WordPress section (the order of directives is important): RewriteCond %{HTTP_HOST} ^foo\.org [NC] RewriteRule ^events$ … Read more

How to protect media directory with .htaccess?

# Only allow access to this directory if they are coming from your domain; excluding you, your server, Google and any other IPs RewriteEngine On RewriteCond %{REMOTE_ADDR} !^(xxx\.xxx\.xxx\.xxx|xxx\.xxx\xxx\.xxx|66\.249\.) RewriteCond %{HTTP_HOST} !^(127\.0\.0\.0|localhost) [NC] RewriteCond %{HTTP_REFERER} !^https?://(.+\.)?yourdomain\.com/ [NC] RewriteRule .* http://yourdomain.com/ [L] That should help, I think

Menu links only using http after enabling https, unable to redirect http links

RewriteCond %{HTTP_HOST} ^example\.me [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.me/$1 [R,L] You’ve not stated where exactly you are adding these rules in your .htaccess file(s). The order is important. These directives need to go at the top of the .htaccess file, before the WordPress front-controller, otherwise they won’t redirect anything other than static resources. This … Read more

Should I enable FastCGI on WordPress?

For data that’s been cached, the two caches should perform equivalent. In general, most folks will find that WP-Supercache is easier to setup and use from an admin perspective (purging & pre-populating). People cache for two reasons: 1) Improved concurrency at handling many visitors simultaneously. This is only relevant to high-traffic sites. For this, both … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)