Hi team,
May i know how to write a rewrite rule for
https://www.example.com/.testing-folder/sample-file.txt Internally it should hit /content/dam/testing-folder/sample-file.txt
I tried below but its not working
RewriteRule ^/.testing-folder/(.*)$ /content/dam/testing-folder/sample-file.txt [PT,L]
해결되었습니다! 솔루션으로 이동.
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
조회 수
답글
좋아요 수
Hi @shyams67489715
Rules looks fine.
could you please check the url, it seems there is a . before the testing-folder in the rule.
@shyams67489715
Please try below rule
RewriteCond %{REQUEST_URI} ^/.testing-folder
RewriteRule ^/.testing-folder/(.*)$ /content/dam/testing-folder/$1 [PT,L]
Hi @shyams67489715
Rules looks fine.
could you please check the url, it seems there is a . before the testing-folder in the rule.
Below will help to internal redirect:
Regex:
RewriteCond %{HTTP_HOST} https://www.example.com
RewriteRule ^/.testing-folder/(.*) /content/dam/testing-folder/sample-file.txt [PT,L]
OR
Exact match
RewriteCond %{HTTP_HOST} https://www.example.com
RewriteRule ^/.testing-folder/sample-file.txt$
/content/dam/testing-folder/sample-file.txt
The rule looks okay, but id rather do (make sure you escape the DOT)
RewriteRule ^/\.testing-folder/sample-file\.txt$ /content/dam/testing-folder/sample-file.txt [PT,L]
@shyams67489715 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
조회 수
답글
좋아요 수