I wasn’t sure what the title should be but its s simple concept but I’m useless with .htaccess rewrites.
I currently have:
RewriteRule ^([a-zA-z0-9_-]+)/?$ index.php?page=$1
which will happily send all requests to my index and I can do what I want.
I have:
RewriteRule ^events/([a-zA-Z0-9-./]+)/?$ index.php?page=events/index&id=$1
For more intermit stuff..
But I want to say
If the url is “/mycms/…” Send use to %{HTTP_HOST}/cms and stay there…
Can anyone help? my ‘catch all’ rule keeps fecking it up.
Edit I Got this to work wonderful
RewriteRule ^mycms([a-zA-Z0-9-./]+)?$ /cms$1 [L]
RewriteCond %{REQUEST_URI} !^/cms
RewriteRule ^([a-zA-z0-9_-]+)/?$ index.php?page=$1
Now I write http://localhost/mycms and will head off to http://localhost/cms
I still want to mask the ‘/cms/’ folder though… o_O
You just need to place a rewrite before your catch all and use the L flag to prevent it being rewritten again, something like this should suffice.