Table of Contents
回复讨论(解决方案)

求htaccess规则

Jun 23, 2016 pm 01:53 PM
htaccess rule

除了 /admin 和 /use 目录都转跳 /new目录

RewriteRule ^([^\/admin\/(.*)])|^([^\/user\/(.*)])   /new/$1
这个哪错了 


回复讨论(解决方案)


RewriteEngine on
RewriteCond %{REQUEST_URI} !^(/admin|/user)
RewriteRule (.*) /new/$1

RewriteEngine on
RewriteCond %{REQUEST_URI} !^(/admin|/user)
RewriteRule (.*) /new/$1


500错误 

这种情况要考虑断言
(?!admin|user)
一般的非或与写出来 也许会违背初衷

RewriteEngine onRewriteBase /RewriteCond $1 !^(admin\/(.*)|$)RewriteCond $1 !^(user\/(.*)|$)RewriteCond $1 !^(new\/(.*)|$)RewriteRule ^(.*)$ new/$1 [L,QSA]
Copy after login

这种情况要考虑断言
(?!admin|user)
一般的非或与写出来 也许会违背初衷




应当考虑不然不违背原始意图
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1665
14
PHP Tutorial
1269
29
C# Tutorial
1249
24
Rules and exceptions for pointer comparisons? Rules and exceptions for pointer comparisons? Jun 04, 2024 pm 06:01 PM

In C/C++, the pointer comparison rules are as follows: pointers pointing to the same object are equal. Pointers to different objects are not equal. Exception: Pointers to null addresses are equal.

Naming conventions and rules for PHP functions Naming conventions and rules for PHP functions May 19, 2023 am 08:14 AM

As a very popular scripting language, PHP has powerful function library support. Its function naming conventions and rules have an important impact on development efficiency and code readability. This article will introduce the naming conventions and rules of PHP functions. 1. Naming style In PHP, function names need to strictly comply with naming specifications and rules. The specifications mainly include two aspects: naming style and naming rules. 1. Underline nomenclature Underline nomenclature is the most commonly used way to name PHP functions and is also an officially recommended way. Function names that follow this pattern

A deep dive into the definition and specification of Python identifiers A deep dive into the definition and specification of Python identifiers Dec 29, 2023 am 08:34 AM

An in-depth understanding of the definitions and rules of Python identifiers requires specific code examples. Python is a concise and powerful programming language with a wide range of applications. In Python programming, identifiers play a vital role. This article will delve into the definition and rules of Python identifiers and provide specific code examples to help readers better understand and apply them. First, let’s understand the definition of Python identifiers. In Python, an identifier can be the name of a variable, function, class, module, etc.

Linux firewall-iptables detailed explanation Linux firewall-iptables detailed explanation Feb 20, 2024 am 11:57 AM

Project introduction iptables is a free packet filtering firewall software under Linux system, which can realize packet filtering, packet redirection and network address translation and other functions. It is an efficient and flexible solution that replaces expensive commercial firewalls. iptables has powerful configuration options and rule settings, allowing users to finely control network traffic according to their own needs and improve network security and performance. The rules of iptables actually refer to the conditions predefined by the network administrator. The rules are generally defined as "If the data packet header meets such conditions, process the data packet in this way." The rules are stored in the packet filtering table in the kernel space. These rules respectively specify the source address, destination address, transmission protocol (such as TCP, U

Detailed explanation of the representation methods and rules of character constants in various programming languages Detailed explanation of the representation methods and rules of character constants in various programming languages Dec 27, 2023 am 11:56 AM

How are character constants represented in different programming languages? Introduction: In the programming process, character constants are immutable values ​​that represent a single character. Different programming languages ​​have different ways of representing character constants. This article will introduce the ways to represent character constants in several common programming languages ​​and give specific code examples. 1. C language represents character constants: In C language, character constants are represented by single quotes ('). Here are some examples: Representing a character: chach='a'; Representing an escape character: cha

AI Contract Theory ⑤: Generative AI is racing with thousands of sails, how to use rules to 'steer' AI Contract Theory ⑤: Generative AI is racing with thousands of sails, how to use rules to 'steer' Jun 02, 2023 pm 08:21 PM

21st Century Business Herald reporter Cai Shuyue, Guo Meiting, intern Tan Yanwen, Mai Zihao, reporting from Shanghai and Guangzhou Editor's note: In the past few months of 2023, major companies have rushed to seize large models, explore the commercialization of GPT, and the computing infrastructure has been bullish... Just like 15 In the Age of Discovery that opened in the 20th century, human exchanges, trade, and wealth experienced explosive growth, and the space revolution swept the world. At the same time, change also brings challenges to order, such as data leakage, personal privacy risks, copyright infringement, false information... In addition, the post-humanist crisis brought by AI is already on the table. What attitude should people take? Are you facing the myths caused by the mixture of humans and machines? At this moment, seeking consensus on AI governance and reshaping a new order have become issues faced by all countries. Nancai Compliance Technology Research Institute will launch AI

What are the rules of flexible layout? What are the rules of flexible layout? Nov 21, 2023 pm 01:33 PM

The rules of flexible layout include: 1. Declaration of containers and items; 2. Main axis and cross axis; 3. Alignment and distribution; 4. Properties of flexible items; 5. Line wrapping and reverse; 6. Space distribution and size adjustment; 7 , Cross-axis order; 8. Cross-axis alignment; 9. Additional rules for flexible containers; 10. Nested flexible containers, etc. Detailed introduction: 1. Declaration of containers and items. In flexible layout, containers are used to contain items. The container can be any block-level element; 2. Main axis and cross axis. Items in flexible layout are arranged on the main axis and cross axis. ;3. Alignment and distribution, etc.

Detailed explanation of ZKSync airdrop rules: How are ZK tokens distributed? Who is eligible? Detailed explanation of ZKSync airdrop rules: How are ZK tokens distributed? Who is eligible? Jun 14, 2024 pm 10:13 PM

Detailed explanation of ZKSync airdrop rules: How are ZK tokens distributed? Who is eligible? The much-anticipated ZKsync airdrop distribution plan has been finalized. The ZKsync Association will conduct a one-time airdrop of 3.6 billion ZK tokens to early ZKsync users and adopters next week, with 695,232 eligible wallets. The snapshot is on March 24, and community members can check airdrop eligibility on the Claim.zknation.io website and claim airdrops starting next week until January 3, 2025. This airdrop represents 17.5% of the total supply of ZK tokens. Users will be able to claim their tokens starting next week until January 3, 2025. Contributors can claim it starting from June 24th. Who is eligible for

See all articles