Home Backend Development PHP Tutorial Record the sub-domain name and static link just made with mod_rewrite codeigniter_PHP tutorial

Record the sub-domain name and static link just made with mod_rewrite codeigniter_PHP tutorial

Jul 13, 2016 am 10:51 AM
codeigniter mod rewrite one time Do point domain name of Record Link static




Record the sub-domain name and static link just made with mod_rewrite codeigniter
Solution
1. Take a look at your apache2/bin/httpd l
Is there mod_rewrite.so
in it? If not, please recompile withrewrite
2. Add load module to httpd.conf (check the syntax yourself)
If something appears in build when restarting apache, it means that the module has been compiled into apache and does not need to be loaded. Remove the line httpd.conf
3. Open your conf/extra/httpdvhosts.conf
Find your virtual host, this is my configuration file
I need to separate 7 channels. Note that the host header regex cannot match .+?, which will kill your img.domain.com, so be careful

ServerAdmin [url=http://www.phpchina.com/bbs/mailto:www@domain.com]Link tag www@domain.com[/url]
DocumentRoot "/data0/wwwroot/www2.domain.com/"
ServerName [url=http://www.domian.com/]Link tag www.domian.com[/url]
ServerAlias ​​game.domain.com soft.domain.com video.domain.com theme.domain.com ebook.domain.com pic.domain.com audio.domain
i.com domain.com
ErrorLog "|/usr/local/sbin/cronolog /data1/logs/httpd/www2/error_log.%Y%m%d"
CustomLog "|/usr/local/sbin/cronolog /data1/logs/httpd/www2/access_log.%y%m%d" combined
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(game|soft|video|theme|pic|audio|ebook).domain.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^(game|soft|video|theme|pic|audio|ebook).domain.com(/*)$ /index.php/$1
RewriteRule ^(game|soft|video|theme|pic|audio|ebook).domain.com/(lists|detail)/(.*?).html$ /index.php/$1/$2/$3


The above configuration can help me disguise the [url=http://www.domain.com/index.php/game] link mark http://www.domain.com/index.php/game[/url] as [ url=http://game.domain.com/]Link tag http://game.domain.com[/url]
[url=http://game.domain.com/lists/2/40.html]Link tag http://game.domain.com/lists/2/40.html[/url] => [url=http ://www.domain.com/index.php/game/lists/2/40]Link tag http://www.domain.com/index.php/game/lists/2/40[/url]
Note apache2/bin/apachectl restart

[ ]


D8888D’s reply content
The key is regular url matching. [img]http://www.phpchina.com/bbs/images/smilies/default/biggrin.gif[/img]
D8888D’s reply content
I think you might as well create a second-level domain name to point to.
If it were applied to one link per member, the experiment would be understandable. I think this will increase a lot of load on apache

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632531.htmlTechArticleRecord the sub-domain name and static link codeigniter just made with mod_rewrite Solution 1. Look at your apache2/ Is there mod_rewrite.so in bin/httpd l? If not, please recompile...
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 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)

How to use magnet links How to use magnet links Feb 18, 2024 am 10:02 AM

Magnet link is a link method for downloading resources, which is more convenient and efficient than traditional download methods. Magnet links allow you to download resources in a peer-to-peer manner without relying on an intermediary server. This article will introduce how to use magnet links and what to pay attention to. 1. What is a magnet link? A magnet link is a download method based on the P2P (Peer-to-Peer) protocol. Through magnet links, users can directly connect to the publisher of the resource to complete resource sharing and downloading. Compared with traditional downloading methods, magnetic

How to uninstall/delete MOD in OpenIV How to uninstall/delete MOD in OpenIV Feb 18, 2024 pm 04:25 PM

OpenIV is a popular game modification tool, mainly used in the Grand Theft Auto (GTA) series of games. Although using mods can add new features and improve the experience to the game, sometimes we may need to delete installed mods for various reasons. This article will explain how to remove mods using OpenIV. First, make sure you have the OpenIV tools installed. For users who have not installed it, you can download it from the OpenIV official website (https://www.ope

How to download links starting with 115://? Download method introduction How to download links starting with 115://? Download method introduction Mar 14, 2024 am 11:58 AM

Recently, many users have been asking the editor, how to download links starting with 115://? If you want to download links starting with 115://, you need to use the 115 browser. After you download the 115 browser, let's take a look at the download tutorial compiled by the editor below. Introduction to how to download links starting with 115:// 1. Log in to 115.com, download and install the 115 browser. 2. Enter: chrome://extensions/ in the 115 browser address bar, enter the extension center, search for Tampermonkey, and install the corresponding plug-in. 3. Enter in the address bar of 115 browser: Grease Monkey Script: https://greasyfork.org/en/

Where can I view the records of things I have purchased on Pinduoduo? How to view the records of purchased products? Where can I view the records of things I have purchased on Pinduoduo? How to view the records of purchased products? Mar 12, 2024 pm 07:20 PM

Pinduoduo software provides a lot of good products, you can buy them anytime and anywhere, and the quality of each product is strictly controlled, every product is genuine, and there are many preferential shopping discounts, allowing everyone to shop online Simply can not stop. Enter your mobile phone number to log in online, add multiple delivery addresses and contact information online, and check the latest logistics trends at any time. Product sections of different categories are open, search and swipe up and down to purchase and place orders, and experience convenience without leaving home. With the online shopping service, you can also view all purchase records, including the goods you have purchased, and receive dozens of shopping red envelopes and coupons for free. Now the editor has provided Pinduoduo users with a detailed online way to view purchased product records. method. 1. Open your phone and click on the Pinduoduo icon.

Cyberpunk 2077 sees up to a 40% performance boost with new optimized path tracing mod Cyberpunk 2077 sees up to a 40% performance boost with new optimized path tracing mod Aug 10, 2024 pm 09:45 PM

One of the standout features ofCyberpunk 2077is path tracing, but it can put a heavy toll on performance. Even systems with reasonably capable graphics cards, such as the RTX 4080 (Gigabyte AERO OC curr. $949.99 on Amazon), struggle to offer a stable

How to set up the keyboard boot function on a GIGABYTE motherboard (enable keyboard boot mode on GIGABYTE motherboard) How to set up the keyboard boot function on a GIGABYTE motherboard (enable keyboard boot mode on GIGABYTE motherboard) Dec 31, 2023 pm 05:15 PM

How to set up keyboard startup on Gigabyte's motherboard. First, if it needs to support keyboard startup, it must be a PS2 keyboard! ! The setting steps are as follows: Step 1: Press Del or F2 to enter the BIOS after booting, and go to the Advanced (Advanced) mode of the BIOS. Ordinary motherboards enter the EZ (Easy) mode of the motherboard by default. You need to press F7 to switch to the Advanced mode. ROG series motherboards enter the BIOS by default. Advanced mode (we use Simplified Chinese to demonstrate) Step 2: Select to - [Advanced] - [Advanced Power Management (APM)] Step 3: Find the option [Wake up by PS2 keyboard] Step 4: This option The default is Disabled. After pulling down, you can see three different setting options, namely press [space bar] to turn on the computer, press group

How to get the WeChat video account link? How to add product links to WeChat video account? How to get the WeChat video account link? How to add product links to WeChat video account? Mar 22, 2024 pm 09:36 PM

As part of the WeChat ecosystem, WeChat video accounts have gradually become an important promotion tool for content creators and merchants. Getting links to video accounts on this platform is crucial for sharing and disseminating content. The following will introduce in detail how to obtain the WeChat video account link and how to add product links to the video account to improve the dissemination effect of the content. 1. How to get the WeChat video account link? After posting a video on your WeChat video account, the system will automatically create a video link. Authors can copy the link after publishing to facilitate sharing and dissemination. After logging in to your WeChat video account, you can browse the homepage of your video account. On the home page, each video is accompanied by a corresponding link so you can copy or share it directly. 3. Search video account: Enter the video account name in the WeChat search box

The first choice for CS players: recommended computer configuration The first choice for CS players: recommended computer configuration Jan 02, 2024 pm 04:26 PM

1. Processor When choosing a computer configuration, the processor is one of the most important components. For playing games like CS, the performance of the processor directly affects the smoothness and response speed of the game. It is recommended to choose Intel Core i5 or i7 series processors because they have powerful multi-core processing capabilities and high frequencies, and can easily cope with the high requirements of CS. 2. Graphics card Graphics card is one of the important factors in game performance. For shooting games such as CS, the performance of the graphics card directly affects the clarity and smoothness of the game screen. It is recommended to choose NVIDIA GeForce GTX series or AMD Radeon RX series graphics cards. They have excellent graphics processing capabilities and high frame rate output, and can provide a better gaming experience. 3. Memory power

See all articles