Tag Info

New answers tagged

0

Option 1 This is the clean way using .htaccess. Put this at the top of your .htaccess: <IfModule mod_alias.c> RedirectMatch 301 /portal/wp-content/uploads/(.*) /wp-content/uploads/$1 </IfModule> Option 2 This is a bit brute-force and I therefore wouldn't recommend it, but I include it here for completeness. Just copy all files in ...


0

yes, use the redirection plugin. redirect all traffic from blog.mysite.com to mysite.com and use the plugin for a second redirect to the actual page. After you moved the site and change the htacess run a crawler on mysite.com and fix the 404 errors that you will see.


0

Ok some wise guy deleted my last post. The answer, which the above member (@etc) gave to me on another forum, and is working quite fine, is as follows: # Rewrites for Bedrock Multi-Site Subdomain Setup rewrite /wp-admin$ $scheme://$host$uri/ last; rewrite ^/(wp-.*.php)$ /wp/$1 last; rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last; He revised his ...


0

I know it's an old question, but I recently ran into a similar problem and the ErrorDocument directive alone did not solve it for me. In my case, I had an incorrectly formatted .htpasswd file. When I recreated one using the htpasswd tool, everything worked as expected. Just thought I'd pass this along as an option in case someone else runs into the same ...


-1

do not blame the .htaccess file. Edit wpmuldap/lib/wpmu_ldap.functions.php $domain = strtolower( wp_specialchars( $newUserName ) ); if( constant( "VHOST" ) == 'yes' ) { $newdomain = $domain . "." . $current_site->domain; $path = '/' . $base; } else { $newdomain = $current_site->domain; $path = '/' . $base . ...


0

Yes, it is :) There are a few things you need to do, maybe I can point you in the right direction. If you haven't already set up the virtual host on your server here are some instructions If you are trying to move an existing site you will need to use a database search and replace tool to change your Wordpress directory


0

You can try modifying your query using pre_get_posts filter. function mod_query() { if ($query->is_main_query() && !is_admin() && is_search()) { // test print queried search terms print_r( $query->query_vars['s'] ); $search_terms = $query->query_vars['s']; $search_terms = preg_replace('/\s+/', '+', ...


1

.htaccess rules are interpreted and applied on every request, they don't linger on server level and changes apply immediately. However if you had had 301 redirect set up then it can be cached by browser very aggressively. I do not observe redirect you are describing, so that is likely the case. Note that your home URL 404s for me right now, so you might ...


0

After asking here, I keep trying myself too so I am able to do it and working on my side. I added below codes in my .htaccess file and after that I am able to redirect all upper URLs without any 404 error. Redirect 301 /search/label http://www.example.com/category Redirect 301 /search http://www.example.com Redirect 301 /feed http://www.example.com For ...


1

When you include index.php/ at the start of your custom permalink structure you are telling WordPress to use PATHINFO permalinks. WordPress Codex - PATHINFO: "Almost_Pretty" It is possible you are using an IIS (Windows) server or that mod_rewrite is not working correctly. Permalinks without mod_rewrite The following plugin can help you determine if ...


0

Parsing of the requested URL happens in the file wp-includes/class-wp.php. The magic happens starting at line 148 in the parse_request function. For path info style permalinks, $_SERVER['PATH_INFO'] is used, for pretty permalinks, $_SERVER['REQUEST_URI'] is used.


0

I will expand my question with more information for better understanding. At the /testting/ folder (the blog's directory). The basic .htaccess shows: RewriteBase /testting/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /testting/index.php [L] Once ...


0

The WordPress file / folder permissions should be as following. For Directories: 755 For Files: 644 Except the following: /wp-content/ 774 /wp-content/themes/ = 755 or 775 (set to allow editing) /wp-content/plugins/ = 755 Some plugins will complain but if they require write access they will let you know. /wp-content/uploads/ = 775 check to recursively ...


0

If i understand right what you're looking for is get_query_var( $var ) which return the given var passed trough the rewrite process. http://codex.wordpress.org/Function_Reference/get_query_var Here a list of WordPress Query Vars http://codex.wordpress.org/WordPress_Query_Vars For debugging purpose you can get a list of all the query_vars using: global ...



Top 50 recent answers are included