ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Apache Rewrite - Hiding a directory, but it's not working

August 31, 2007 11:58pm

Subscribe [1]
  • #1 / Aug 31, 2007 11:58pm

    Hop Studios

    500 posts

    I’m trying to get an Apache rewrite to work properly. I’m trying to intercept what would be a directory listing, and instead send it to the index.php program for processing.

    http://www.moviemaker.com/magazine/issues/62/

    (This address happens to also be a directory on the server.)

    RewriteCond $1 ^magazine/issues/(..?.?)$
    RewriteRule ^/magazine/issues/(...) <a href="http://www.moviemaker.com/index.php/magazine/issue_forward/$1">http://www.moviemaker.com/index.php/magazine/issue_forward/$1</a>    [L]

    Any idea why this wouldn’t work? (i.e. I get the directory forbidden message)? I’m sure the RewriteCond is working, because a different RewriteRule does get acted upon…

    TTFN
    Travis

  • #2 / Sep 05, 2007 6:20pm

    Hop Studios

    500 posts

    The answer turned out to be, don’t use a RewriteCond at all, the RewriteRule itself was specific enough.  Oh, and leave off the opening slash.  Go figure.

    RewriteRule ^magazine/issues/(..?.?)$ <a href="http://www.moviemaker.com/magazine/issue_forward/$1">http://www.moviemaker.com/magazine/issue_forward/$1</a>    [L]
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases