Jump to content

Rewrite fine-tuning


Recommended Posts

I have the script

Options +FollowSymlinksRewriteEngine OnRewriteRule ^files/([^/]+)\/index.php files/index.php?id=$1 [NC]

working fine, but struggle with some fine-tuning.I would like to skip 'files/' altogether, but trying things like

RewriteRule ^([^/]+)\/index.php files/index.php?id=$1 [NC]

does not work.Also, there are occasions where user might just enter www.domain.co.uk/$1. How can I make sure those also get to $1/index.php?id=$1?Son

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...