문제

I am having this in a .htaccess:

RewriteEngine On 
RewriteRule ^videos/([0-9]+)/?$ vis_film.php?id=$1 [NC,L]

My page is root/directory/directory/videos/vis_film.php?id=2

but i want it to be

root/directory/directory/videos/2/

And ive placed the .htaccess file inside videos/, is that right? and what have i done wrong?

올바른 솔루션이 없습니다

다른 팁

If you’re already in videos/, you need to remove that path prefix from your pattern:

RewriteRule ^([0-9]+)/?$ vis_film.php?id=$1 [NC,L]

You need to put it in the 2nd directory (root/directory/directory/videos/)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top