Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
7 years ago
Commit
73089262dc511ae5247b2d2ef2f827444b9e34d4
1 parent
d08c4992
router
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
doraemon/middleware/htaccess/rules/default.js
doraemon/middleware/htaccess/rules/list.js
doraemon/middleware/htaccess/rules/www.js
doraemon/middleware/htaccess/rules/default.js
View file @
7308926
...
...
@@ -10,7 +10,7 @@ const TYPE = require('../type');
module
.
exports
=
[
{
type
:
TYPE
.
redirect
,
origin
:
/
\/
about
\?
shopId=
([\d]
+
)
/
,
origin
:
/
^
\/
about
\?
shopId=
([\d]
+
)
/
,
target
:
(
req
,
match
,
id
)
=>
{
return
helpers
.
urlFormat
(
`
/
shop$
{
id
}
-
about
`
,
null
,
req
.
subdomains
[
0
]);
}
...
...
doraemon/middleware/htaccess/rules/list.js
View file @
7308926
...
...
@@ -139,7 +139,7 @@ module.exports = [
},
{
type
:
TYPE
.
rewrite
,
origin
:
/
\/(
.*
)
-new/
,
origin
:
/
^
\/(
.*
)
-new/
,
target
:
(
req
,
match
,
channel
)
=>
{
return
`
/
product
/
list
/
$
{
channel
}
-
new
`
;
}
...
...
doraemon/middleware/htaccess/rules/www.js
View file @
7308926
...
...
@@ -102,7 +102,7 @@ module.exports = [
// 新品到着
{
type
:
TYPE
.
rewrite
,
origin
:
/
\/(
.*
)
-new/
,
origin
:
/
^
\/(
.*
)
-new/
,
target
:
(
req
,
match
,
channel
)
=>
{
return
`
/
product
/
list
/
$
{
channel
}
-
new
`
;
}
...
...
@@ -179,7 +179,7 @@ module.exports = [
},
{
type
:
TYPE
.
rewrite
,
origin
:
/
\/
shop
([\d]
+
)
-about/
,
origin
:
/
^
\/
shop
([\d]
+
)
-about/
,
target
:
(
req
,
match
,
id
)
=>
{
req
.
query
.
domain
=
req
.
subdomains
[
0
];
req
.
query
.
shopId
=
id
;
...
...
Please
register
or
login
to post a comment