Question

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?

No correct solution

OTHER TIPS

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/)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top