A
A
Arris2014-02-12 13:06:18
htaccess
Arris, 2014-02-12 13:06:18

DirectoryIndex & Redirect

Hello.
Project folder structure:

./adminka/ (куча файлов, в частности module1.working.php)
./adminka/module1/ (куча служебных скриптов для модуля №1)

module1.working.php - interface for working with module No. 1
In ./adminka/.htaccess it says
DirectoryIndex adminka.php
adminka.php - these are all sorts of menus, including transferring control to module1.working.php when needed.
I want something strange :
When you enter /adminka/module1/ in the browser line, a redirect to ./adminka/module1.working.php should occur.
That is, something like
DirectoryIndex { Redirect ../module1.working.php }
PS A crutch like
DirectoryIndex module1. redirect.php
and
header("Location: /adminka/module1.working.php") in module1.redirect.php
this can be solved, but in my opinion, ugly.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stepan, 2014-02-12
@L3n1n

DirectoryIndex and Redirect are first of all different things.
The first specifies the default page, the second redirects.
Solution:
1. Through a rewrite in ./adminka/.htaccess, write the CNC to /adminka/module1/
2. Through a redirect to /adminka/module1/.htaccess, write a redirect to /adminka/module1.working.php
Strange, you came up with a solution for yourself with DirectoryIndex...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question