This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.+)$ index.php?/$1 [QSA,L] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GETの場合 | |
http://example.jp/example.php?query=data | |
# PATHINFOの場合 | |
http://example.jp/example.php/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# やりたいこと | |
http://example.jp/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 例 | |
http://example.jp/hoge/fuga.php # この場合は、hogeディレクトリ下のfuga.phpが呼び出される | |
http://example.jp/hoge.php/fuga # こうなると、hoge.phpディレクトリ下のfugaが存在しない場合、hoge.phpが呼び出され、/fugaはPATHINFOになる |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://example.jp/index.php/hoge # 成功 | |
http://example.jp/hoge # 失敗 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://example.jp/hoge # これを以下のように変換している | |
http://example.jp/index.php?hoge # 説明したPATHINFOの形と違う |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body onclick="console.log('0');"> | |
<div onclick="console.log('1');"> | |
<p onclick="console.log('2');">test</p> | |
</div> | |
<script src="./main.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdarg.h> | |
template <typename ... Args> | |
void cprintf(const char *format, Args const & ... args); | |
int main(void) | |
{ | |
cprintf("Content-type: text/html"); | |
cprintf(""); |
OlderNewer