Answer the question
In order to leave comments, you need to log in
How to add a subdirectory before the last slash to the url?
We have a URL like
site.ru/subdir1/subdir2/subdirN/filename.jpg
How can I add another directory with a specific name before /filename.jpg using php and regular expressions.
The output should be the line
site.ru/subdir1/subdir2/subdirN /newsubdir /filename.jpg
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question