php - What kind of htaccess rules would I need to accommodate files within folders? -


i'm rewriting portfolio website urls using following code in htaccess file,

rewriteengine on rewritebase /  #remove enter code here.php; use the_request prevent infinite loops rewritecond %{the_request} ^get\ (.*)\.php\ http rewriterule (.*)\.php$ $1 [r=301]  # remove index rewriterule (.*)/index$ $1/ [r=301]  # remove slash if not directory rewritecond %{request_filename} !-d rewritecond %{request_uri} /$ rewriterule (.*)/ $1 [r=301]  # add .php access file, don't redirect rewritecond %{request_filename}.php -f rewritecond %{request_uri} !/$ rewriterule (.*) $1\.php [l] 

it works until want navigate page blog-post.php page example, let want go page url becomes cgarcia.design/web/about , should cgarcia.design/about page can load properly. now need change in htaccess file accommodate files within folders?

my nav structure following

  • work
  • about
  • resume
  • blog - posts folder - entry
  • contact

thank suggestions.

add ned of document:

rewriterule ^$ web/  rewritecond %{request_filename} !-f  rewritecond %{request_filename} !-d  rewriterule ^(.*)$ web/$1 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -