current setup:
RewriteCond %{REQUEST_URI} ^/people(.html)?/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/content/main/en/people/(.*)$
RewriteRule /people(.html)?/(.*)$ /content/main/en/people.dir.html/$2 [PT,L]
new setup:
#FIRST
RewriteCond %{REQUEST_URI} ^/product1(.html)?/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/content/main/en/product1/(.*)$
RewriteRule /product1(.html)?/(.*)$ /content/main/en/product1.dir.html/$2 [PT,L]
LogLevel alert rewrite:trace6
#SECOND
RewriteCond %{REQUEST_URI} ^/product2(.html)?/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/content/main/en/product2/(.*)$
RewriteRule /product2(.html)?/([^/]*)/?(.*)$ /content/main/en/product2.dir.html/$2$3 [PT,L]
LogLevel alert rewrite:trace6
test results for #FIRST
[Mon Aug 23 03:29:26.339887 2021] [rewrite:trace2] [pid 26014:tid 139679642937088] mod_rewrite.c(470): [client 129.96.84.45:30376] 10.44.0.7 - - [www.my-host.com/sid#56216f42e620][rid#7f098c004980/initial] rewrite '/product1/name/name/2021' -> '/content/main/en/product1/name.dir.html/name/2021'
[Mon Aug 23 03:29:26.339894 2021] [rewrite:trace2] [pid 26014:tid 139679642937088] mod_rewrite.c(470): [client 129.96.84.45:30376] 10.44.0.7 - - [www.my-host.com/sid#56216f42e620][rid#7f098c004980/initial] forcing '/content/main/en/product1/name.dir.html/name/2021' to get passed through to next API URI-to-filename handler
test results for #SECOND
[Mon Aug 23 03:25:48.119398 2021] [rewrite:trace2] [pid 26014:tid 139679483475712] mod_rewrite.c(470): [client 129.96.84.45:29840] 10.44.0.7 - - [www.my-host.com/sid#56216f42e620][rid#7f0984002970/initial] rewrite '/product2/name/2021' -> '/content/main/en/product2/name.dir.html/name2021'
[Mon Aug 23 03:25:48.119406 2021] [rewrite:trace2] [pid 26014:tid 139679483475712] mod_rewrite.c(470): [client 129.96.84.45:29840] 10.44.0.7 - - [www.my-host.com/sid#56216f42e620][rid#7f0984002970/initial] forcing '/content/main/en/product2/name.dir.html/name2021' to get passed through to next API URI-to-filename handler
Solved! Go to Solution.
Views
Replies
Total Likes
just to check why your first case have intial rewrite rule with two name i.e
/product1/name/name/2021'
You have another rule for this?
Thanks
Dipti
just to check why your first case have intial rewrite rule with two name i.e
/product1/name/name/2021'
You have another rule for this?
Thanks
Dipti
Views
Likes
Replies