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?

  • only as simple solution - may be put second index.php & .htaccess into the video folder? – Max Lazar Mar 19 '13 at 7:21
  • Did not work for me, unfortunately. – Yuri Salimovskiy Mar 19 '13 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 Mar 19 '13 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] – Yuri Salimovskiy Mar 20 '13 at 5:27

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


may work?

  • Bluedreamer, the pagination links are correct. They just don't work because directory with same name exists. – Yuri Salimovskiy Mar 21 '13 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/… – Bluedreamer Mar 21 '13 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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