AudioJungle

htaccess help

1277 posts
  • Bought between 50 and 99 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Interviewed on the Envato Notes blog
  • Referred between 100 and 199 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+2 more
rondog says

I am trying to fix up the url so it looks like: http://mysite.com/videos/xxxx.m4v

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^videos/([^/]+).m4v fileserve.php?id=$1

When I go to http://mysite.com/videos/1.m4v, I get a 404 not found:

The requested URL /mnt/stor2-wc1-dfw1/xxxxx/mysite.com/web/content/fileserve.php was not found on this server.

fileserve.php is definitely there so I am not sure what I am doing wrong.

1745 posts
  • Microlancer Beta Tester
  • Elite Author
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Austria
  • Exclusive Author
  • Referred between 200 and 499 users
+2 more
revaxarts says

I didn’t test it but maybe the ’.’ should be escaped:

RewriteRule ^videos/([^/]+)\.m4v fileserve.php?id=$1
1277 posts
  • Bought between 50 and 99 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Interviewed on the Envato Notes blog
  • Referred between 100 and 199 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+2 more
rondog says

well the rewrite rule is working. It is pointing to fileserve.php as you can see in the 404 error, it is just saying it doesn’t exist even though it is there. I tried escaping the period but that didn’t make any difference :(

1745 posts
  • Microlancer Beta Tester
  • Elite Author
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Austria
  • Exclusive Author
  • Referred between 200 and 499 users
+2 more
revaxarts says

hmm weird…

set a RewriteBase:
RewriteEngine On
RewriteBase /

and make sure your file IS there! Maybe it is wrong spelled or something

1277 posts
  • Bought between 50 and 99 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Interviewed on the Envato Notes blog
  • Referred between 100 and 199 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+2 more
rondog says

hmm weird… set a RewriteBase:
RewriteEngine On
RewriteBase /
and make sure your file IS there! Maybe it is wrong spelled or something

the RewriteBase fixed it! You’re awesome man thanks!

1745 posts
  • Microlancer Beta Tester
  • Elite Author
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Austria
  • Exclusive Author
  • Referred between 200 and 499 users
+2 more
revaxarts says

no problem :)

by
by
by
by
by