views:

24

answers:

2

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?

+1  A: 

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]
Gumbo
Yeah or that xD
henasraf
I still get 500 server error.. on the whole videos/ directory.. i tried videos/2 and videos/vis_film.php?id=2 but i just get 500 internal server error
Karem
@Azzyh: Maybe you’re not allowed to use a .htaccess there. What does the error log say?
Gumbo
I dont know how to access the error log.. I will need to ask the admin of the server
Karem
A: 

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

henasraf
I still get 500 server error.. on the whole videos/ directory.. i tried videos/2 and videos/vis_film.php?id=2 but i just get 500 internal server error
Karem