Redirect htaccess

I need to help with redirect my page.

For example I have websites I need to move content from to That is not problem and I do that with a change home_page URL. That work pretty well. But Now I need to add redirect from old to I want to do with .htaccess but that does not work. Can you help me guys?

Here are some of my attempts of this but both does not work.

RewriteEngine On RewriteRule [L,R=302] 


RewriteEngine On Redirect 302 

Thank you for your help and time guys.

Major search engines redirect an HTTP link to a scammy pharmacy site

There is an HTTP website (not HTTPS) that works perfectly fine when the URL is directly typed into the address bar or when links are clicked from other websites/applications like Reddit, Facebook, and Discord.

The exceptions are the major search engines: Google, Yahoo, and Bing. When clicked from one of these sites, it is redirected to a scammy pharmacy site with one of many different domain names. This occurs in Chrome, Firefox, and Edge; it also occurs on Android smartphones. (Bing only does this in Chrome; it works fine in Firefox and Edge.) This issue occurs for multiple people on many different devices.

Interestingly, other search engines (Dogpile, Baidu, Ask, DuckDuckGo, Yandex, etc.) seem to work fine.

What could be the cause of this behavior? Do the search engines or the website need to be fixed, and how? Would converting to HTTPS help, and why?

The website in question is I am not the webmaster, but as a programmer and web developer I am curious about this issue.

Exclude folder from redirect

WordPress redirects everything in wp-content if accessed directly to 404 with the following:

<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$   - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> 

What I want to do is not redirect the contents of a sub folder

Any ideas how I can achieve this?

Redirect users from admin pages the optimal solution

On two different sites I use two somewhat different solutions. Are they different in terms of security and performance? Which is better? Are there even better ones?

Solution 1.

/** Redirect users from admin pages if not administrators **/ add_action( 'admin_init', function() {     if( ! current_user_can( 'manage_options' ) && ( ! wp_doing_ajax() ) ) {         wp_safe_redirect( site_url() );         exit;     } } ); 

Solution 2.

/** Redirect users from admin pages if not administrators **/ add_action( 'admin_init', function() {     if( ! in_array( 'administrator', wp_get_current_user()->roles ) ) {         wp_redirect( get_bloginfo( 'wpurl' ) );         exit;     } } ); 

WordPress redirect from URL with BuddyPress

I am using the plugin BuddyPress on my WordPress site and when the user clicks on their profile they are redirected to the URL "/members/USERNAME/profile/home/". However, I do not want this page to be there and so I would like the profile ‘landing’ page to be the URL "/members/USERNAME/activity/".

I am not experienced with WordPress or PHP but I attempted to code a redirect for this when the user ends up on the ‘home’ page which is placed within my BuddyPress members/single/home.php file within my child theme:

$  redirect_url_home = get_home_url(); $  redirect_url_home_tt = $  redirect_url_home; $  username_redirect_tt = wp_get_current_user(); $  new_redirect_slug = "'/members/'.$  username_redirect_tt->user_login.'/activity/'"; $  redirect_url_home_tt. = $  new_redirect_slug; echo($  redirect_url_home_tt); wp_safe_redirect( $  redirect_url_home_tt ); 

This code doesn’t work but that was my thinking of how to solve my problem and I’m sure there is an easier/nicer way to do what I would like, maybe even without a coded redirect and within BuddyPress itself? I have tried using their forum/documentation for answers but haven’t had a reply or found anything useful.

As I say I have no experience with this sort of stuff so any help would be greatly appreciated! Also, to add, I cannot link the site as it is currently on a localhost.


Purchasing a high Domain Rating domain for a 301 redirect

I’m considering purchasing a domain that has a high Domain Rating (78) by ahrefs (

The domain is a good domain in terms of not just its domain rating but also its name. It’s short, and has good keywords in it.

The domain was owned by a company which does essentially what my company does. The competitor’s company went out of business a few months ago.They were a much larger and much more successful company than mine at this point. I’m just starting out with sales.

I am considering purchasing the domain but it is quite expensive. If I were to purchase the domain, I would want to make sure I could turn the positive aspects of this domain into something positive for my business.

My intention was to do a 301 redirect, but I’m not sure how that will help me. I don’t want to assume the other company’s name, I just want to point potential visitors to MY company’s domain and also am hoping to catch a bump in authority or rating myself. That said, I’m not sure that is how that works.

Is it possible to do what I mentioned above and have it be of significant value to my company?

Do you have any other suggestions or alternative angles to best benefit from the purchase of a domain like I’ve described above.

wp_logout without redirect

I am creating my own login page, and checking if the user is logged in. If so, calling wp_logout before rendering my page.

This works, but I do get warnings as WordPress is trying to redirect me. Cannot modify header information

I cannot find a way to simply logout, and carry on. Is there a way to do it, or a reason why this is so hard?

Many thanks

Google Domains won’t redirect `http` to `https` when Bluehost handles the DNS and website

I have a website hosted on bluehost, but using a domain from Google domains. I am trying to force it to always redirect -> from the google domains site.

However, when I add the redirect, I get the following error:

This synthetic record has an error and will not function correctly: We had a temporary issue creating your SSL certificate. We will automatically keep trying to resolve this issue. 

enter image description here

We have it setup to redirect permanently using SSL: enter image description here

We are using bluehost name servers. Are we missing something here?