MAKE REWRITE RULES ON .HTACCESS FILE


If you need to make a rewrite rule on your .htaccess file, for example a condition if a URL not contains an string, you will need to make the following:

  • Before we begin generating the actual URL rewrites, we need to activate the apache mod_rewrite module that controls them. Lets type in your terminal:
  • Edit (or create) an .htaccess file on your project root:
  • Those are some examples of what you can get done with your .htaccess file: