我正在一个部署在Linux服务器上的网站.我做了很少的改动.我有文件夹读取.要求是,如果我输入URL localhost:80 / tom / Read或../READ或/读它需要导航到读取文件夹中的read.php.
我在根目录下创建了一个文件.htaccess.请参阅第mentioned here页,在文件中放置以下代码
RewriteEngine On
RewriteBase /tom/
RewriteMap lc int:tolower
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$/index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$index.php/$1 [L]
RewriteRule ![A-Z] - [S=26]
RewriteRule ^(.*)(A)(.*)$$1a$3 [N,R=301]
RewriteRule ^(.*)(B)(.*)$$1b$3 [N,R=301]
RewriteRule ^(.*)(C)(.*)$$1c$3 [N,R=301]
RewriteRule ^(.*)(D)(.*)$$1d$3 [N,R=301]
RewriteRule ^(.*)(E)(.*)$$1e$3 [N,R=301]
RewriteRule ^(.*)(F)(.*)$$1f$3 [N,R=301]
RewriteRule ^(.*)(G)(.*)$$1g$3 [N,R=301]
RewriteRule ^(.*)(H)(.*)$$1h$3 [N,R=301]
RewriteRule ^(.*)(I)(.*)$$1i$3 [N,R=301]
RewriteRule ^(.*)(J)(.*)$$1j$3 [N,R=301]
RewriteRule ^(.*)(K)(.*)$$1k$3 [N,R=301]
RewriteRule ^(.*)(L)(.*)$$1l$3 [N,R=301]
RewriteRule ^(.*)(M)(.*)$$1m$3 [N,R=301]
RewriteRule ^(.*)(N)(.*)$$1n$3 [N,R=301]
RewriteRule ^(.*)(O)(.*)$$1o$3 [N,R=301]
RewriteRule ^(.*)(P)(.*)$$1p$3 [N,R=301]
RewriteRule ^(.*)(Q)(.*)$$1q$3 [N,R=301]
RewriteRule ^(.*)(R)(.*)$$1r$3 [N,R=301]
RewriteRule ^(.*)(S)(.*)$$1s$3 [N,R=301]
RewriteRule ^(.*)(T)(.*)$$1t$3 [N,R=301]
RewriteRule ^(.*)(U)(.*)$$1u$3 [N,R=301]
RewriteRule ^(.*)(V)(.*)$$1v$3 [N,R=301]
RewriteRule ^(.*)(W)(.*)$$1w$3 [N,R=301]
RewriteRule ^(.*)(X)(.*)$$1x$3 [N,R=301]
RewriteRule ^(.*)(Y)(.*)$$1y$3 [N,R=301]
RewriteRule ^(.*)(Z)(.*)$$1z$3 [N,R=301]
但它不工作.
我是Linux环境的新手.我不知道mod_speling.这是一个文件吗?它将位于Linux服务器中?