문제

I need to create some redirect rules for my site.

I would like to redirect (by using .htaccess file):

my_site.com/folder/dynamic_text_info_ID.png, eg: my_site.com/folder/this_is_my_text_sample_123.png

to

my_site.com/showpng.php?id=123

Note: I could not put http:// in the example URL, but they should be there for each of the URL.

How to do this?

And anywhere have a better explain for how to create this?

Thanks

올바른 솔루션이 없습니다

다른 팁

put this code in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On
RewriteBase /

RewriteRule ^folder/.+?_([0-9]+)\.png$ /showpng.php?id=$1 [L,QSA,NC]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top