Rewrite rules – I want blog / customfilename.php to be redirected to blog / customfilename using web.config wordpress

I just want to redirect this blog / customfilename.php file to blog / customfilename using web.config WordPress.
I apply this rule:

However, this rule applies to all files in the blog folder, but I only want to apply it to one file. I have already applied all the tags as in the comment section, please check in or something, etc. no fruitful result. Thank you

html – Not redirected to the user's profile page when the "Posted by:" link is clicked, but to the 404 default page I created

I am creating a social blog. I successfully displayed users and redirected them to the post they clicked on the main page. However, I'm stuck forwarding him or her to the creator of the post page (where is the entire blog that the creator posted)?. I had thought about it for days. I can't really meet anyone at this difficult time, so I would be very happy if you can help me. Thank you very much!!

P / s. I really think there's something wrong with it when I write username = first name + middle name + last name. If the function works, the URL of the page should be: / LoveComputerScience, not /users.fist_name….users.middle_name…users.last_name.

Here are my codes for my models (databases):

class User(db.Model, UserMixin):
    __tablename__ = 'users'

    id = db.Column(db.Integer, primary_key=True)
    profile_image = db.Column(db.String(64), nullable=False, default='default_profile.jpg' ) 
    email = db.Column(db.String(64), unique=True, index=True) 
    first_name = db.Column(db.String(20))
    last_name = db.Column(db.String(20))
    middle_name = db.Column(db.String(20))
    username = first_name+middle_name+last_name
    password_hash = db.Column(db.String(128))

    posts = db.relationship('BlogPost', backref='creator', lazy=True) 

    def __init__(self,email,first_name,last_name, password):     
        self.email = email
        self.first_name = first_name
        self.last_name = last_name
        self.password_hash = generate_password_hash(password)

    def check_password(self, password):
        return check_password_hash(self.password_hash, password)

    def __repr__(self):
        return f"Username: {self.username}"



class BlogPost(db.Model):

    users = db.relationship(User)

    blog_id = db.Column(db.Integer, primary_key=True)
    user_id = db.Column(db.Integer,db.ForeignKey('users.id'), nullable=False)  
    date = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)  
    problem_name = db.Column(db.String(140), nullable=False)
    text = db.Column(db.Text, nullable=False)

    def __init__(self, text, problem_name, user_id):
        self.text = text
        self.problem_name = problem_name
        self.user_id = user_id

    def __repr__(self):
        return f"Post ID: {self.post_id} -- Date:{self.date}---{self.problem_name}"

Here are my codes for my templates that show the link that the user can click and see the creator. (It is the homepage where every blog is displayed) (Posted by: {{post.creator.first_name}} {{post.creator.middle_name}} {{post.creator.last_name}}):

....Exendting from base.html(nav,style....)
{% for post in many_posts.items %}
    


{% endfor %}

Here are my codes for my views / routes of the function:

@users.route('/')
def user_posts(username):

    page = request.args.get('page',1,type=int) #request 1 page to scroll
    home_user = User.query.filter_by(username=username).first_or_404() #check if the user is created  #THIS IS WORKIING SO IT MEANS SOMETHING IS WRONG ABOUT THE username=username

    blog_posts = BlogPost.query.filter_by(creator=home_user).order_by(BlogPost.date.desc()).paginate(page=page, per_page=5) #make sure you can scroll and see 5 pages using paginate
    return render_template('user_blog_posts.html', blog_posts=blog_posts, home_user=username)

These images below show what happens when I click the creator's link:

Homepage where all articles are displayed:
Homepage on which all posts are displayed

The 404 page that appears when I click "Posted by: Love Computer Science" should display the Love Computer Science user page:
The 404 page that appears when I click "Posted by: Love Computer Science" should display the Love Computer Science user page

The function of clicking the "Read More" button worked:
The function of clicking the "Read More" button worked

Dear name configuration of computer science:
Love the names of computer science

Rewrite URLs – Rewrite rules are redirected

An attempt is made to start a custom rewrite for a page.
Page Slug: / near me /
Create redirection: / near-me / STATE / city /
Even after rinsing the permalinks.

//* Add Rewrite Rule
add_action('init', 'sym_nearme_rewrite_rule', 10, 0);
function sym_nearme_rewrite_rule() {
    add_rewrite_rule('^near-me/((^/)*)/((^/)*)/?','index.php?page_id=4331®ion=$matches(1)&city=$matches(2)','top');
}

Tomcat runs on the 8080 port, but cannot be redirected to the 8443 HTTPS port. The 8443 port is running but cannot access the web

I have deployed web apps with Apache-Tomcat-8.5.37. It had SSL and worked fine, but when I tried to renew the SSL and install the JKS file, it showed various problems. I have resolved several cases, but could not solve the port redirection problem. The port is listed in "netstat" but does not work on the web where my Grails app is running.

I have attached my logs here

And HERE is my server.xml configuration file.

magento2 – Third-party payment methods are not redirected to the SUCCESS page

It is very strange. I've been stuck for 2 months.

All payment methods provided by Magento work normally. Bank transfer, PayPal etc. forward to the success page.

However, third-party payment methods do not redirect to the success page, but to the empty shopping cart page.

All orders are created, payments are recorded. However, the success page is not displayed.

Since not all third-party providers come to the success side, I firmly believe that this has to be done in my instance. My best guess is server related, but then why does PayPal work?

Any help?

  1. Magento 2.3.3
  2. Php 7.2.x.
  3. paint
  4. Redis

Is it possible to be redirected to a malware download URI while using Tor as a proxy?

That is interesting. I just received a forwarded email notification from my data center provider that one of my servers was accessing a sink associated with the Nymaim malware. The report came from the Federal Office for Information Security (BSI).

Since the computer is a Docker host that runs all types of microservices, but certainly not an MS Windows environment, I was a bit irritated because Nymaim (according to my research) is anything but no Linux-based malware is (am I correct with this?).

I kept thinking, and came up with the idea that one of the microservices that uses tor as a proxy and a selenium-based browser to get (https) content may have received a malicious response from a fraudulent exit node, leading to a redirect led to the sink hole.

What do you think is it possible that this is a vector that triggered the BSI notification?

2013 – Web service with HTTP 302 redirected to AccessDenied.aspx

I have custom web services on mine SharePoint 2013 Machine for several years without problems. (Provided as FarmSolution). The FarmSolution has not been deployed to this farm in the past three months.

This morning (as an early Christmas present?!) Mine REST service request

https: //mypage.domain.intern/_layouts/15/xxx.xxx/myApp/Overviews/Overview.aspx/GetGridData

it returns an HTTP 302 and is redirected to

https: //mypage.domain.intern/_layouts/15/AccessDenied.aspx

because of unknown reasons.

I checked access to https: //mypage.domain.intern/_layouts/15/permsetup.aspx

The group setting for "read" has "domain users" as members and I also added "everyone" to make sure everyone should be able to use it, but this didn't help, the redirect always comes.

I am using the farm account with the URL and administrator accounts for the site collection, but I am always redirected to AccessDenied.

In the ULS Viewer I only get this information for the request:

Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|domainmy_farm_account, ClaimsCount=54

SPFederationAuthenticationModule.IsRedirectToLogOnPage: Detected a redirection but the redirect is not to a known signin page: https://mypage.domain.intern/_layouts/15/AccessDenied.aspx

I checked the Windows update history. There has been no new installation for 3 weeks.

The farm has 4 servers (2 front-end and 2 back-end servers), all of which do the same forwarding to AccessDenied.aspx.

I also tried to grant access to

https: //mypage.domain.intern/Access%20Requests/pendingreq.aspx

and approve the requirements and give the user "full control"

Do you have an idea of ​​what I can or should check?

8 – The page is not redirected properly

I tried to intercept a page request from /node/nid which is of the type the_content_type and then append some facet query parameters, which is about that

?f(0)=city%3A160&f(1)=country%3A48,

The purpose is to preselect the facet options on this page.

Here is the class I have written so far

 (
        ('redirectWithFilter'),
      )
    ));
  }

  /**
   * Redirect requests for my_content_type node detail pages to node/123.
   *
   * @param GetResponseEvent $event
   * @return void
   */
  public function redirectWithFilter(GetResponseEvent $event) {
    $request = $event->getRequest();

    // This is necessary because this also gets called on
    // node sub-tabs such as "edit", "revisions", etc.  This
    // prevents those pages from redirected.
    if ($request->attributes->get('_route') !== 'entity.node.canonical') {
      return;
    }

    // Only redirect a certain content type.
    if ($request->attributes->get('node')->getType() !== 'the_content_type') {
      return;
    }

    $node = $request->attributes->get('node');
    $node_id = $node->id();
    $node_url = $node->url();
    $country = $node->field_country->getValue();
    $city = $node->field_city->getValue();
    $country_target_id = $country(0)('target_id');
    $city_target_id = $city(0)('target_id');

    if (empty($country) && empty($city)) {
      return;
    }

    // This is where you set the destination.
    $option = (
      "query" => (
        "f" => (
          "city:$city_target_id",
          "country:$country_target_id"
        )
      ),
    );

    $redirect_url = Url::fromUri("entity:node/$node_id", $option);
    $response = new RedirectResponse($redirect_url->toString(), 301);
    $event->setResponse($response);
  }
}

However, the resulting URL looks good

http://project.dev/some-custom-page?f%5B0%5D=city%3A160&f%5B1%5D=country%3A48

The problem, however, is that the page is always displayed

The page isn’t redirecting properly

in my browser. I've found this out for almost 3 days now and I can't seem to find a way to overcome it. I wanted someone to take a new look at it. Maybe I'm doing something wrong. Can someone help me please? Or maybe different? Thank you in advance.

javascript – Redirected page is still running after redirection

Rows were inserted into a database after the page was already redirected.


I'm creating an administration page for a restaurant and working on adding options for menu items when I came across it. It's no longer a problem because I found the problem, but what happened when I had the problem really confuses me.

I use one fetch Call to send the data to a PHP script add_edit_option.php:

add_edit_option.php

prepare("INSERT INTO options (id, item_id, name, price) VALUES (NULL, ?, ?, ?)");
    if($stmt->execute(($id, $name, $price))){
      echo $conn->lastInsertId();
    } else {
      echo "error";
    }
  } else {
    echo "error";
  }
?>

The problem I had is that the data that was returned was the full code of the main page and not that lastInsertId that it should. I realized that I had forgotten to initialize it $_SESSION and so it redirected to the login page, which redirected back to the main page. I got into that session_start() and it was fixed.

But what I don't understand is that the options were inserted into the database all the time. How did this happen? If the page was redirected, how did it get to the part that inserted the option into the database?