Jump to content
Jerec

Rewrite to page not in root..

Recommended Posts

This is probably an easy answer for most, but mod_rewrite is still a lot of black magic to me.. I'd like.. http://blargh.com/attachments/99d7c5cd00cf8cb27cebabad100d594546cc4eb227aac7f4d243877be130a498 (last part is file hash) to be processed as.. http://blargh.com/attachments/index.php?a={above file hash here} and this is what I've put into .htaccess (which is located at the root).. RewriteRule ^attachments/([A-Za-z0-9-]+)$ /attachments/index.php?h=$1 [NC,L] The result I get is essentially nothing, as though the rule wasn't there, but chances are I just plain did it wrong. Thanks!

Share this post


Link to post
Share on other sites

To be honest, I prefer IIS, it's a lot easier to use as it has a management panel for you to use for rewrite rules.

 

I'll have a look, but i suggest you look at some mod_rewrite tutorials and get a basic knowedge before you try to do advanced rules, for example, not allowing images etc.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...