V
V
Vladimir2012-10-26 14:22:06
Apache HTTP Server
Vladimir, 2012-10-26 14:22:06

How to configure CNC in .htaccess with passing requests to different files?

There are two files at the root: index.phpand admin.php
Cannot teach .htaccess to process requests so that requests like:
/admin
/admin/controller
/admin/controller/action
/admin/controller/action/etc are
redirected to admin.phpand the rest toindex.php

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WEBIVAN, 2012-10-26
@de1vin

RewriteRule ^/admin.*$ /admin.php [NC,L]
RewriteRule ^.*$ /index.php [NC,L]

S
Stepan, 2012-10-26
@L3n1n

RewriteRule ^/admin$ /admin.php [NC]
RewriteRule ^/admin/controller$ /admin.php [NC]

...
And the rest, depending on what parameters to pass to admin.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question