Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nginx-redirector
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
nginx-redirector
Commits
ffa0e145
Commit
ffa0e145
authored
Jul 15, 2020
by
Давид Добряков
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add redirector_test and test_cases
parent
2edcd3c4
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
253 additions
and
46 deletions
+253
-46
test.conf
redirector/tests/nginx/location-includes/test.conf
+2
-6
test.map
redirector/tests/nginx/maps/test.map
+21
-5
test_permanent_options.map
redirector/tests/nginx/maps/test_permanent_options.map
+3
-1
test_rewrite_options.map
redirector/tests/nginx/maps/test_rewrite_options.map
+0
-4
test_status=301_options.map
redirector/tests/nginx/maps/test_status=301_options.map
+4
-1
test.conf
redirector/tests/nginx_test_case/location-includes/test.conf
+10
-0
test.map
redirector/tests/nginx_test_case/maps/test.map
+23
-0
test_permanent_options.map
...tor/tests/nginx_test_case/maps/test_permanent_options.map
+5
-0
test_status=301_options.map
...or/tests/nginx_test_case/maps/test_status=301_options.map
+6
-0
redirector_test.py
redirector/tests/redirector_test.py
+77
-7
test.ini
redirector/tests/test.ini
+1
-1
utils.py
redirector/tests/utils.py
+9
-0
generators.py
redirector/utils/generators.py
+17
-5
test.map
tests/test.map
+75
-16
No files found.
redirector/tests/nginx/location-includes/test.conf
View file @
ffa0e145
if
($
test_redirect
) {
if
($
test_redirect
) {
rewrite
^/
test
/(.*)$ $
test_redirect
break
;
rewrite
^/
test
/(.*)$ $
test_redirect
break
;
}
}
if
($
test_rewrite_redirect
) {
if
($
test_permanent_redirect
) {
rewrite
^/
test
/(.*)$ $
test_rewrite_redirect
break
;
rewrite
^/
test
/(.*)$ $
test_permanent_redirect
permanent
;
return
rewrite
;
}
}
if
($
test_status
=
301
_
redirect
) {
if
($
test_status
=
301
_
redirect
) {
rewrite
^/
test
/(.*)$ $
test_status
=
301
_
redirect
break
;
rewrite
^/
test
/(.*)$ $
test_status
=
301
_
redirect
break
;
return
status
=
301
;
return
status
=
301
;
}
}
if
($
test_permanent_redirect
) {
rewrite
^/
test
/(.*)$ $
test_permanent_redirect
permanent
;
}
redirector/tests/nginx/maps/test.map
View file @
ffa0e145
map $uri $test_redirect {
map $uri $test_redirect {
/test/some-page /test/another-page;
/test^$ /test/cgi-bin/index.cgi;
/test/old-page /test/new-page;
/test([0-9A-Za-z]{12})-del-([0-9A-Za-z]+)/.+$ /test/cgi-bin/index.cgi?del=$1-$2;
/test/very-old-page /test/very-new-page;
/test^([0-9A-Za-z]{12})(\.html?|$)$ /test/cgi-bin/index.cgi?op=download1&id=$1;
~/test^assets/(.+) /test/new-assets/$1;
/test^([0-9A-Za-z]{12})(\/.+|\.html?|$) /test/cgi-bin/index.cgi?op=download1&id=$1&fname=$2;
/test/some-page /other-project/some-page;
/test^([0-9A-Za-z\-_]{4,64})/([0-9A-Za-z]{12})$ /test/cgi-bin/index.cgi?op=download1&usr_login=$1&id=$2;
/test^([0-9A-Za-z\-_]{4,64})/([0-9A-Za-z]{12})(\/.+|\.html?|$) /test/cgi-bin/index.cgi?op=download1&usr_login=$1&id=$2&fname=$3;
/test^checkfiles\.html$ /test/cgi-bin/index.cgi?op=checkfiles;
/test^contact\.html$ /test/cgi-bin/index.cgi?op=contact;
/test^premium\.html$ /test/cgi-bin/index.cgi?op=payments;
/test^/(.*)/htaccesselite-ultimate-htaccess-article.html(.*) /test/htaccess/htaccess.html;
/test^login\.html$ /test/cgi-bin/index.cgi?op=login;
/test^catalogue(.*)\.html$ /test/cgi-bin/index.cgi?op=catalogue&date=$1;
/test^news([0-9]*)\.html$ /test/cgi-bin/index.cgi?op=news&page=$1;
/test^n([0-9]+)-.*\.html$ /test/cgi-bin/index.cgi?op=news_details&news_id=$1;
/test^free([0-9]+)\.html$ /test/cgi-bin/index.cgi?op=registration&aff_id=$1;
/test^users/([0-9A-Za-z\-_]{4,64})/?([0-9]+|$) /test/cgi-bin/index.cgi?op=user_public&usr_login=$1&fld_id=$2;
/test^/200([0-9])/([^01])(.*)$ /test/$2$3;
/test^embedmp3-([0-9A-Za-z]{12})\.html$ /test/cgi-bin/index.cgi?op=mp3_embed&file_code=$1;
/test^embedmp4-([0-9A-Za-z]{12})\.html$ /test/cgi-bin/index.cgi?op=mp32_embed&file_code=$1;
/test^box$ /test/cgi-bin/index_box.cgi;
}
}
\ No newline at end of file
redirector/tests/nginx/maps/test_permanent_options.map
View file @
ffa0e145
map $uri $test_permanent_redirect {
map $uri $test_permanent_redirect {
/test/special-project https://github.com/etersoft/special-project;
/test^/manual/(.*)$ http://www.php.net/manual/$1;
/test/java/jwarehouse/org.eclipse.(.*)/(.*) http://www.devdaily.com/java/jwarehouse/eclipse/org.eclipse.$1/$2;
}
}
\ No newline at end of file
redirector/tests/nginx/maps/test_rewrite_options.map
deleted
100644 → 0
View file @
2edcd3c4
map $uri $test_rewrite_redirect {
/test/categories /test/categories;
}
\ No newline at end of file
redirector/tests/nginx/maps/test_status=301_options.map
View file @
ffa0e145
map $uri $test_status=301_redirect {
map $uri $test_status=301_redirect {
/test/article-123.html /test/articles/123;
/test/2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html /test/dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html;
/test/2007/phpbb/sending-post-form-data-with-php-curl.html /test/htaccess/sending-post-form-data-with-php-curl.html;
/test/2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html /test/dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html;
}
}
\ No newline at end of file
redirector/tests/nginx_test_case/location-includes/test.conf
0 → 100644
View file @
ffa0e145
if
($
test_redirect
) {
rewrite
^/
test
/(.*)$ $
test_redirect
break
;
}
if
($
test_permanent_redirect
) {
rewrite
^/
test
/(.*)$ $
test_permanent_redirect
permanent
;
}
if
($
test_status
=
301
_
redirect
) {
rewrite
^/
test
/(.*)$ $
test_status
=
301
_
redirect
break
;
return
status
=
301
;
}
redirector/tests/nginx_test_case/maps/test.map
0 → 100644
View file @
ffa0e145
map $uri $test_redirect {
/test^$ /test/cgi-bin/index.cgi;
/test([0-9A-Za-z]{12})-del-([0-9A-Za-z]+)/.+$ /test/cgi-bin/index.cgi?del=$1-$2;
/test^([0-9A-Za-z]{12})(\.html?|$)$ /test/cgi-bin/index.cgi?op=download1&id=$1;
/test^([0-9A-Za-z]{12})(\/.+|\.html?|$) /test/cgi-bin/index.cgi?op=download1&id=$1&fname=$2;
/test^([0-9A-Za-z\-_]{4,64})/([0-9A-Za-z]{12})$ /test/cgi-bin/index.cgi?op=download1&usr_login=$1&id=$2;
/test^([0-9A-Za-z\-_]{4,64})/([0-9A-Za-z]{12})(\/.+|\.html?|$) /test/cgi-bin/index.cgi?op=download1&usr_login=$1&id=$2&fname=$3;
/test^checkfiles\.html$ /test/cgi-bin/index.cgi?op=checkfiles;
/test^contact\.html$ /test/cgi-bin/index.cgi?op=contact;
/test^premium\.html$ /test/cgi-bin/index.cgi?op=payments;
/test^/(.*)/htaccesselite-ultimate-htaccess-article.html(.*) /test/htaccess/htaccess.html;
/test^login\.html$ /test/cgi-bin/index.cgi?op=login;
/test^catalogue(.*)\.html$ /test/cgi-bin/index.cgi?op=catalogue&date=$1;
/test^news([0-9]*)\.html$ /test/cgi-bin/index.cgi?op=news&page=$1;
/test^n([0-9]+)-.*\.html$ /test/cgi-bin/index.cgi?op=news_details&news_id=$1;
/test^free([0-9]+)\.html$ /test/cgi-bin/index.cgi?op=registration&aff_id=$1;
/test^users/([0-9A-Za-z\-_]{4,64})/?([0-9]+|$) /test/cgi-bin/index.cgi?op=user_public&usr_login=$1&fld_id=$2;
/test^/200([0-9])/([^01])(.*)$ /test/$2$3;
/test^embedmp3-([0-9A-Za-z]{12})\.html$ /test/cgi-bin/index.cgi?op=mp3_embed&file_code=$1;
/test^embedmp4-([0-9A-Za-z]{12})\.html$ /test/cgi-bin/index.cgi?op=mp32_embed&file_code=$1;
/test^box$ /test/cgi-bin/index_box.cgi;
}
\ No newline at end of file
redirector/tests/nginx_test_case/maps/test_permanent_options.map
0 → 100644
View file @
ffa0e145
map $uri $test_permanent_redirect {
/test^/manual/(.*)$ http://www.php.net/manual/$1;
/test/java/jwarehouse/org.eclipse.(.*)/(.*) http://www.devdaily.com/java/jwarehouse/eclipse/org.eclipse.$1/$2;
}
\ No newline at end of file
redirector/tests/nginx_test_case/maps/test_status=301_options.map
0 → 100644
View file @
ffa0e145
map $uri $test_status=301_redirect {
/test/2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html /test/dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html;
/test/2007/phpbb/sending-post-form-data-with-php-curl.html /test/htaccess/sending-post-form-data-with-php-curl.html;
/test/2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html /test/dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html;
}
\ No newline at end of file
redirector/tests/redirector_test.py
View file @
ffa0e145
import
unittest
import
unittest
from
redirector.tests.utils
import
get_abs_path
from
redirector.tests.utils
import
get_abs_path
,
get_rel_path
from
redirector.conf.config
import
Config
from
redirector.conf.config
import
Config
from
redirector.redirector
import
*
from
redirector.redirector
import
*
from
redirector.utils
import
generators
from
redirector.utils
import
parser
class
TestGenerator
(
generators
.
Generator
):
def
get_conf_dirs
(
self
):
config
=
Config
()
abs_conf_path
=
get_abs_path
(
'test.ini'
)
config
.
read_config
(
abs_conf_path
)
maps_dir
=
config
.
get_default_dir
(
'MAPS_DIR'
)
config_dir
=
config
.
get_default_dir
(
'CONFIG_DIR'
)
return
maps_dir
,
config_dir
class
TestRedirector
(
Redirector
):
def
__init__
(
self
,
logger
=
None
):
self
.
parser
=
parser
.
ConfigReader
(
logger
=
logger
)
self
.
generator
=
TestGenerator
()
class
EqualRedirectorTest
(
unittest
.
TestCase
):
class
EqualRedirectorTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
redirector
=
Redirector
()
self
.
redirector
=
Test
Redirector
()
def
test_equal_map
(
self
):
def
test_equal_map
(
self
):
config
=
Config
()
abs_config_path
=
get_abs_path
(
'test.ini'
)
config
.
read_config
(
abs_config_path
)
abs_yaml_path
=
get_abs_path
(
'test.yaml'
)
abs_yaml_path
=
get_abs_path
(
'test.yaml'
)
abs_test_path
=
get_abs_path
(
'test.map'
)
abs_test_path
=
get_abs_path
(
'test.map'
)
abs_res_conf_path
=
get_rel_path
(
'nginx_test_case/location-includes/test.conf'
)
res_conf_file
=
open
(
abs_res_conf_path
,
'r'
)
res_conf_lines
=
[]
for
line
in
res_conf_file
:
if
len
(
line
)
>
2
or
not
line
.
startswith
(
'#'
):
res_conf_lines
.
append
(
line
)
res_conf_file
.
close
()
maps_dir
=
get_rel_path
(
'nginx_test_case/maps'
)
abs_res_map_paths
=
[
'{}/test.map'
.
format
(
maps_dir
),
'{}/test_permanent_options.map'
.
format
(
maps_dir
),
\
'{}/test_status=301_options.map'
.
format
(
maps_dir
)]
res_map_lines
=
[]
for
path
in
abs_res_map_paths
:
f
=
open
(
path
,
'r'
)
for
line
in
f
:
if
len
(
line
)
>
2
or
not
line
.
startswith
(
'#'
):
res_map_lines
.
append
(
line
)
f
.
close
()
self
.
redirector
.
generate
(
abs_yaml_path
,
abs_test_path
)
abs_test_conf_path
=
get_rel_path
(
'nginx/location-includes/test.conf'
)
test_conf_file
=
open
(
abs_test_conf_path
,
'r'
)
test_conf_lines
=
[]
for
line
in
test_conf_file
:
if
len
(
line
)
>
2
or
not
line
.
startswith
(
'#'
):
test_conf_lines
.
append
(
line
)
test_conf_file
.
close
()
test_maps_dir
=
get_rel_path
(
'nginx/maps'
)
abs_test_map_paths
=
[
'{}/test.map'
.
format
(
test_maps_dir
),
'{}/test_permanent_options.map'
.
format
(
test_maps_dir
),
\
'{}/test_status=301_options.map'
.
format
(
test_maps_dir
)]
test_map_lines
=
[]
for
path
in
abs_test_map_paths
:
f
=
open
(
path
,
'r'
)
for
line
in
f
:
if
len
(
line
)
>
2
or
not
line
.
startswith
(
'#'
):
test_map_lines
.
append
(
line
)
f
.
close
()
self
.
assertEqual
(
res_conf_lines
,
test_conf_lines
)
self
.
assertEqual
(
res_map_lines
,
test_map_lines
)
redirector/tests/test.ini
View file @
ffa0e145
[DEFAULT]
[DEFAULT]
nginx_dir
=
'/home/kantegory/pvt/nginx-redirector/tests/nginx'
nginx_dir
=
/home/kantegory/pvt/nginx-redirector/redirector/tests/nginx
maps_dir
=
%(nginx_dir)s/maps
maps_dir
=
%(nginx_dir)s/maps
config_dir
=
%(nginx_dir)s/location-includes
config_dir
=
%(nginx_dir)s/location-includes
redirector/tests/utils.py
View file @
ffa0e145
...
@@ -8,3 +8,12 @@ def get_abs_path(fname):
...
@@ -8,3 +8,12 @@ def get_abs_path(fname):
return
abs_path
return
abs_path
def
get_rel_path
(
fname
):
curr_dir
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
rel_path
=
os
.
path
.
relpath
(
fname
,
start
=
curr_dir
)
abs_path
=
os
.
path
.
join
(
rel_path
,
curr_dir
,
fname
)
abs_path
=
os
.
path
.
normpath
(
abs_path
)
return
abs_path
redirector/utils/generators.py
View file @
ffa0e145
...
@@ -5,24 +5,36 @@ class Generator:
...
@@ -5,24 +5,36 @@ class Generator:
self
.
map_gen
=
MapGenerator
()
self
.
map_gen
=
MapGenerator
()
self
.
conf_gen
=
ConfigGenerator
()
self
.
conf_gen
=
ConfigGenerator
()
def
get_conf_dirs
(
self
):
config
=
Config
()
config
.
read_config
()
maps_dir
=
config
.
get_default_dir
(
'MAPS_DIR'
)
config_dir
=
config
.
get_default_dir
(
'CONFIG_DIR'
)
return
maps_dir
,
config_dir
def
generate
(
self
,
redirects_data
,
project_name
):
def
generate
(
self
,
redirects_data
,
project_name
):
redirects_map
=
self
.
map_gen
.
generate_map
(
redirects_data
[
0
],
project_name
)
redirects_map
=
self
.
map_gen
.
generate_map
(
redirects_data
[
0
],
project_name
)
redirects_with_options
=
self
.
map_gen
.
generate_opt_map
(
redirects_data
[
1
],
project_name
)
redirects_with_options
=
self
.
map_gen
.
generate_opt_map
(
redirects_data
[
1
],
project_name
)
conf_data
=
self
.
conf_gen
.
generate_config
(
project_name
,
[
code
for
code
,
data
in
redirects_with_options
])
conf_data
=
self
.
conf_gen
.
generate_config
(
project_name
,
[
code
for
code
,
data
in
redirects_with_options
])
config
=
Config
()
#config = Config()
config
.
read_config
()
#config.read_config()
maps_dir
,
config_dir
=
self
.
get_conf_dirs
()
try
:
try
:
with
open
(
config
.
get_default_dir
(
'MAPS_DIR'
)
+
"/
%
s.map"
%
project_name
,
"w"
)
as
map_file
:
with
open
(
maps_dir
+
"/
%
s.map"
%
project_name
,
"w"
)
as
map_file
:
map_file
.
write
(
redirects_map
)
map_file
.
write
(
redirects_map
)
for
code
,
data
in
redirects_with_options
:
for
code
,
data
in
redirects_with_options
:
if
code
==
"301"
:
if
code
==
"301"
:
code
=
"permanent"
code
=
"permanent"
elif
code
==
"302"
:
elif
code
==
"302"
:
code
=
"redirect"
code
=
"redirect"
with
open
(
config
.
get_default_dir
(
'MAPS_DIR'
)
+
"/
%
s_
%
s_options.map"
%
(
project_name
,
code
),
"w"
)
as
map_file
:
with
open
(
maps_dir
+
"/
%
s_
%
s_options.map"
%
(
project_name
,
code
),
"w"
)
as
map_file
:
map_file
.
write
(
data
)
map_file
.
write
(
data
)
with
open
(
config
.
get_default_dir
(
'CONFIG_DIR'
)
+
"/
%
s.conf"
%
project_name
,
"w"
)
as
conf_file
:
with
open
(
config
_dir
+
"/
%
s.conf"
%
project_name
,
"w"
)
as
conf_file
:
conf_file
.
write
(
conf_data
)
conf_file
.
write
(
conf_data
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
)
print
(
e
)
...
...
tests/test.map
View file @
ffa0e145
# comment
/some-page /another-page
# RewriteRule ^$ /cgi-bin/index.cgi [L]
/old-page /new-page
^$ /cgi-bin/index.cgi
/very-old-page /very-new-page
# regexp
# RewriteRule ([0-9A-Za-z]{12})-del-([0-9A-Za-z]+)/.+$ /cgi-bin/index.cgi?del=$1-$2 [L]
~^assets/(.+) /new-assets/$1
([0-9A-Za-z]{12})-del-([0-9A-Za-z]+)/.+$ /cgi-bin/index.cgi?del=$1-$2
# additional redirect options
# RedirectMatch 301 ^/manual/(.*)$ http://www.php.net/manual/$1
/categories /categories [rewrite]
^/manual/(.*)$ http://www.php.net/manual/$1
/article-123.html /articles/123 [status=301]
# RewriteRule ^([0-9A-Za-z]{12})(\.html?|$)$ /cgi-bin/index.cgi?op=download1&id=$1 [L]
# root-relative urls
^([0-9A-Za-z]{12})(\.html?|$)$ /cgi-bin/index.cgi?op=download1&id=$1
/some-page //other-project/some-page
# RewriteRule ^([0-9A-Za-z]{12})(\/.+|\.html?|$) /cgi-bin/index.cgi?op=download1&id=$1&fname=$2 [L]
# absolute redirect
^([0-9A-Za-z]{12})(\/.+|\.html?|$) /cgi-bin/index.cgi?op=download1&id=$1&fname=$2
/special-project https://github.com/etersoft/special-project
# RedirectMatch 301 /java/jwarehouse/org.eclipse.(.*)/(.*) http://www.devdaily.com/java/jwarehouse/eclipse/org.eclipse.$1/$2
/java/jwarehouse/org.eclipse.(.*)/(.*) http://www.devdaily.com/java/jwarehouse/eclipse/org.eclipse.$1/$2
# RewriteRule ^([0-9A-Za-z\-_]{4,64})/([0-9A-Za-z]{12})$ /cgi-bin/index.cgi?op=download1&usr_login=$1&id=$2 [L]
^([0-9A-Za-z\-_]{4,64})/([0-9A-Za-z]{12})$ /cgi-bin/index.cgi?op=download1&usr_login=$1&id=$2
# RewriteRule ^([0-9A-Za-z\-_]{4,64})/([0-9A-Za-z]{12})(\/.+|\.html?|$) /cgi-bin/index.cgi?op=download1&usr_login=$1&id=$2&fname=$3 [L]
^([0-9A-Za-z\-_]{4,64})/([0-9A-Za-z]{12})(\/.+|\.html?|$) /cgi-bin/index.cgi?op=download1&usr_login=$1&id=$2&fname=$3
# RewriteRule ^checkfiles\.html$ /cgi-bin/index.cgi?op=checkfiles [L]
^checkfiles\.html$ /cgi-bin/index.cgi?op=checkfiles
# Redirect 301 /2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html /dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html
/2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html /dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html [status=301]
# RewriteRule ^contact\.html$ /cgi-bin/index.cgi?op=contact [L]
^contact\.html$ /cgi-bin/index.cgi?op=contact
# RewriteRule ^premium\.html$ /cgi-bin/index.cgi?op=payments [L]
^premium\.html$ /cgi-bin/index.cgi?op=payments
# RedirectMatch 301 ^/(.*)/htaccesselite-ultimate-htaccess-article.html(.*) /htaccess/htaccess.html
^/(.*)/htaccesselite-ultimate-htaccess-article.html(.*) /htaccess/htaccess.html
# RewriteRule ^login\.html$ /cgi-bin/index.cgi?op=login [L]
^login\.html$ /cgi-bin/index.cgi?op=login
# Redirect 301 /2007/phpbb/sending-post-form-data-with-php-curl.html /htaccess/sending-post-form-data-with-php-curl.html
/2007/phpbb/sending-post-form-data-with-php-curl.html /htaccess/sending-post-form-data-with-php-curl.html [status=301]
# RewriteRule ^catalogue(.*)\.html$ /cgi-bin/index.cgi?op=catalogue&date=$1 [L]
^catalogue(.*)\.html$ /cgi-bin/index.cgi?op=catalogue&date=$1
# RewriteRule ^news([0-9]*)\.html$ /cgi-bin/index.cgi?op=news&page=$1 [L]
^news([0-9]*)\.html$ /cgi-bin/index.cgi?op=news&page=$1
# Redirect 301 /2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html /dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html
/2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html /dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html [status=301]
# RewriteRule ^n([0-9]+)-.*\.html$ /cgi-bin/index.cgi?op=news_details&news_id=$1 [L]
^n([0-9]+)-.*\.html$ /cgi-bin/index.cgi?op=news_details&news_id=$1
# RewriteRule ^free([0-9]+)\.html$ /cgi-bin/index.cgi?op=registration&aff_id=$1 [L]
^free([0-9]+)\.html$ /cgi-bin/index.cgi?op=registration&aff_id=$1
# RewriteRule ^users/([0-9A-Za-z\-_]{4,64})/?([0-9]+|$) /cgi-bin/index.cgi?op=user_public&usr_login=$1&fld_id=$2 [L]
^users/([0-9A-Za-z\-_]{4,64})/?([0-9]+|$) /cgi-bin/index.cgi?op=user_public&usr_login=$1&fld_id=$2
# RedirectMatch 301 ^/200([0-9])/([^01])(.*)$ /$2$3
^/200([0-9])/([^01])(.*)$ /$2$3
# RewriteRule ^embedmp3-([0-9A-Za-z]{12})\.html$ /cgi-bin/index.cgi?op=mp3_embed&file_code=$1 [L]
^embedmp3-([0-9A-Za-z]{12})\.html$ /cgi-bin/index.cgi?op=mp3_embed&file_code=$1
# RewriteRule ^embedmp4-([0-9A-Za-z]{12})\.html$ /cgi-bin/index.cgi?op=mp32_embed&file_code=$1 [L]
^embedmp4-([0-9A-Za-z]{12})\.html$ /cgi-bin/index.cgi?op=mp32_embed&file_code=$1
# RewriteRule ^box$ /cgi-bin/index_box.cgi [L]
^box$ /cgi-bin/index_box.cgi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment