1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-09-19 23:21:47 +02:00

Resolve relative path issues once and for all

cc #56
For `.htaccess`
This commit is contained in:
Chaoyi Zha 2014-11-29 19:59:42 -05:00
parent df6740a3a8
commit b4e0dc9c28

View File

@ -124,14 +124,14 @@
$data = "<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase $path
RewriteRule ^api$ /api.php [L]
RewriteRule ^api/$ /api.php [L]
RewriteRule ^api$ api.php [L]
RewriteRule ^api/$ api.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9]+)\?([a-zA-Z0-9]+)$ /r.php?u=$1&lkey=$2 [L,QSA]
RewriteRule ^([a-zA-Z0-9]+)/?$ /r.php?u=$1 [L,QSA]
RewriteRule ^t-([a-zA-Z0-9]+)/?$ /r.php?u=t-$1 [L,QSA]
RewriteRule ^/?\+([a-zA-Z0-9]+)$ /stats.php?bv=$1 [L,QSA]
RewriteRule ^([a-zA-Z0-9]+)\?([a-zA-Z0-9]+)$ r.php?u=$1&lkey=$2 [L,QSA]
RewriteRule ^([a-zA-Z0-9]+)/?$ r.php?u=$1 [L,QSA]
RewriteRule ^t-([a-zA-Z0-9]+)/?$ r.php?u=t-$1 [L,QSA]
RewriteRule ^/?\+([a-zA-Z0-9]+)$ stats.php?bv=$1 [L,QSA]
</IfModule>
";
$handle = fopen('.htaccess', 'w');