0

i want to access core php file in yii using directly access from web url

my htaccess is

   <IfModule mod_rewrite.c>
      RewriteEngine On

# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
 </IfModule>

Thanks

3
  • directly place your file in root directory where your index.php placed Commented Jul 3, 2015 at 6:04
  • but its not working i face url not found Commented Jul 3, 2015 at 6:06
  • I have just tested and it is working. create new file test.php place where you index.php file and access url like yourdomain.com/test.php Commented Jul 3, 2015 at 6:18

1 Answer 1

1

Update by adding exception for your file name

RewriteCond %{REQUEST_URI} !^/yourfile\.php$ 
Sign up to request clarification or add additional context in comments.

1 Comment

add it below # RewriteBase /

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.