Jump to content

Question about RewriteRules


Recommended Posts

  • Active Member

Hey guys,

I'm using .htaccess file with rewrite rules and I got stuck.

I have this link: https://example.com/new/ - here I have the index.php file (which is redirected to https://example.com/new/assests/ where I have header.php and footer.php these files contain links to webpage files which are located in https://example.com/new/pages/ and I need to read them without the .php extension. I need to edit the links in the header.php and footer.php like this:

Spoiler

 


header.php

<li>
     <a href="/new/team">Team</a>
</li>

 

 

 

And here I'm stuck. When I edit it like above, it won't load the team.php located in /new/pages/ folder.

My .htaccess contain these lines:

Spoiler

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /new/index.php [L]


RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

I'll be really glad if someone can help me. I didn't find any solution for this problem.

Thanks for answers!

Sincerely,

ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.