Home Backend Development PHP Tutorial 求apache rewrite 无限二级域名的步骤

求apache rewrite 无限二级域名的步骤

Jun 13, 2016 pm 01:24 PM
amp index net

求apache rewrite 无限二级域名的方法
RewriteCond %{HTTP_HOST} ^[a-z0-9\-]+\.xxx\.net$
RewriteRule ^/?$ /%{HTTP_HOST}
RewriteRule ^/([a-z0-9\-]+)\.xxx\.net/?$ /index.php?app=$1

这是网上找的 二级域名可以使用 也就是当地址栏里输入 bbb.xxx.net 时 实际执行的是 www.xxx.net/index.php?app=bbb

但当URL是bbb.xxx.net/index.php?ac=111&a=222&b=333 rewrite规则怎么样才能使其变成 www.xxx.net/index.php?app=bbb&ac=111&a=222&b=333

求具体的规则

------解决方案--------------------
RewriteRule ^/([a-z0-9\-]+)\.xxx\.net/index\.php\?(.*?)$ /index.php?app=$1&$2

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
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)

What file is index.html? What file is index.html? Feb 19, 2024 pm 01:36 PM

index.html represents the home page file of the web page and is the default page of the website. When a user visits a website, the index.html page is usually loaded first. HTML (HypertextMarkupLanguage) is a markup language used to create web pages, and index.html is also an HTML file. It contains the structure and content of a web page, as well as tags and elements used for formatting and layout. Here is an example index.html code: &lt

Fix 0x800713ec.NET Framework error code Fix 0x800713ec.NET Framework error code Mar 07, 2024 am 10:07 AM

If you encounter the .NET Framework error 0x800713ec when installing a program in Windows 11/10, there are some methods you can take to solve the problem. This error is usually caused by not having the correct .NET Framework version, but there can be other causes. Here, we explore some common root causes to help you identify your issue and resolve it as quickly as possible. The entire error message looks like this: One or more issues caused the installation to fail. Please resolve the issue and try the installation again. See the log file for details. 0x800713ec Fix 0x800713ec.NET Framework Error Code To fix 0x800713ec.NET Framework error code, follow the solutions below

What coin is AMP? What coin is AMP? Feb 24, 2024 pm 09:16 PM

What is AMP Coin? The AMP token was created by the Synereo team in 2015 as the main trading currency of the Synereo platform. AMP token aims to provide users with a better digital economic experience through multiple functions and uses. Purpose of AMP Token The AMP Token has multiple roles and functions in the Synereo platform. First, as part of the platform’s cryptocurrency reward system, users are able to earn AMP rewards by sharing and promoting content, a mechanism that encourages users to participate more actively in the platform’s activities. AMP tokens can also be used to promote and distribute content on the Synereo platform. Users can increase the visibility of their content on the platform by using AMP tokens to attract more viewers to view and share

Huawei releases Watch GT 5 smartwatch across Europe and UK in two sizes with early launch gift Huawei releases Watch GT 5 smartwatch across Europe and UK in two sizes with early launch gift Sep 20, 2024 am 06:47 AM

Huawei has now started selling the Watch GT 5, which has debuted globally alongside the Watch GT 5 Pro and the Watch D2. Added to that, Huawei has also showcased the MatePad Pro 12.2 and MatePad 12 X today outside China, details of which we have cove

what is mysql index what is mysql index Oct 08, 2023 am 11:47 AM

The index in MySQL means index. It is a data structure used to speed up the query of database tables. The index can be compared to the catalog of a book. It stores the values ​​​​of specific columns in the table and the corresponding row positions, making the database more efficient. Locate and access data quickly. The function of the index is to improve query efficiency. Without an index, the database needs to scan the entire table row by row to find matching data. This method will be very time-consuming in large tables. With an index, the database can The required data rows are quickly located in the order, which greatly improves the query speed.

.NET Core cross-platform application development practice: a seamless journey from Windows to Linux and macOS .NET Core cross-platform application development practice: a seamless journey from Windows to Linux and macOS Feb 26, 2024 pm 12:55 PM

With the launch of .NETCore, .NET developers have a new opportunity to easily write and run .NET applications on multiple operating systems. This article will delve into how to use .NETCore to achieve cross-platform application development, and share best practice experience on operating systems such as Windows, Linux, and macOS. 1. Prepare the development environment. To start cross-platform application development, you first need to prepare the development environment for each target platform. Windows On Windows, you can install .NETCoreSDK through Visual Studio. After installation is complete, you can create and run .NETCore projects through Visual Studio. Li

PHP source code running problem: index error solution PHP source code running problem: index error solution Mar 09, 2024 pm 09:24 PM

PHP source code running problem: Index error resolution requires specific code examples. PHP is a widely used server-side scripting language that is often used to develop dynamic websites and web applications. However, sometimes you will encounter various problems when running PHP source code, among which "index error" is a common situation. This article will introduce some common causes and solutions of index errors, and provide specific code examples to help readers better deal with such problems. Problem Description: When running a PHP program

How to remove index.php from https How to remove index.php from https Jun 16, 2023 am 11:41 AM

How to remove index.php from https: 1. Modify the server settings, find the .htaccess file on the server and open it, enter "RewriteEngine On...</IfModule>" and other contents in the file, and then save the file; 2 . Use the URL settings of the CMS system, select "Permalink" in the settings, select "Post Name" in the general settings, and then click "Save Changes"; 3. Use a plug-in to help you remove index.php.

See all articles