Hello! I have a php file at the сайт/scripts/about.php . How to make it open at сайт/about.php
- you need more information, which CMS, which framework, complete the question, otherwise you will not get the answer, because nothing is clear - tCode
- @tCode yes just a PHP file. Yes, there are such too. - ilyaplot
|
2 answers
In the .htaccess file, enable RewriteEngine and write the following:
RewriteRule ^about\.php/?$ scripts/about.php [L] - It seems to be working, when opening the website / about.php address from the GET array, the necessary variables are displayed: scripts and about.php, but for some reason the main index.php page with the website / index.php address is displayed - DoubleClick
- @DoubleClick, I do not know. I checked the function myself. It opens normally - Yuri
- Can the DirectoryIndex index.php line in the .htaccess file somehow affect this? - DoubleClick
- @DoubleClick, maybe, but I don't know. You forgive me, I am not very selective in
.htaccess' e) What I knew, I wrote something - Yuri
|
What question is the answer?
In the root of the site put the file about.php in which to write
<?php include 'scripts/about.php'; |