1

I have a template that is same that directory name (namely, 'video'). Both template and files in directory are linked thoughout the site, so they cannot be removed.

I'm trying to remove index.php from all links, but the recommended method does not work in this particular case.

I've added following lines to my .htaccess, that makes the template 'main' page to be displayed correctly, but the pagination links still do not work. I'm getting 404 returned by server, not EE. I.e /video/ works, but /video/P10 does not.

RewriteCond %{REQUEST_URI} !^video$ [NC]
RewriteCond $1 !\.(css|js|gif|jpe?g|png|pdf|swf|flv|avi|mpe?g) [NC]
RewriteRule ^video(.*)$  index.php/video$1 [L]

Can anyone give me advice on what directive do I have to add to .htaccess so that /video/ and /video/P10 would be correctly served by EE, but /video/some_file.avi would be served by file system?

4
  • only as simple solution - may be put second index.php & .htaccess into the video folder?
    – Max Lazar
    Commented Mar 19, 2013 at 7:21
  • Did not work for me, unfortunately. Commented Mar 19, 2013 at 13:38
  • Have you tried putting the slash into the rewrite rule to see if it effects anything, like... RewriteRule ^video/(.*)$ index.php/video/$1
    – Bob Foster
    Commented Mar 19, 2013 at 19:14
  • I did, it does not change anything. For now, I've set up redirect to /index.php/video/... but would really like index.php to be removed RewriteCond %{THE_REQUEST} ^GET/video [NC] RewriteRule (.*) /index.php/$1 [R=301,L] Commented Mar 20, 2013 at 5:27

1 Answer 1

1

Have you tried the paginate_base parameter? - http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#paginate-base

paginate_base="/"

may work?

2
  • Bluedreamer, the pagination links are correct. They just don't work because directory with same name exists. Commented Mar 21, 2013 at 5:44
  • Ah yes, how about putting a copy of index.php inside the /videos folder as some methods of doing multilingual sites offer? cwcrawley.co.uk/2010/01/… Commented Mar 21, 2013 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.