Generate ItGenerate It
Menu
  • Code Tools
  • Image Tools
  • Domain Tools
  • Website Tools
  • Calculators

Mod Rewrite Generator

The Mod Rewrite Generator can be used to turn dynamic URLs into search engine friendly static URLs. Static URLs typically rank better in search engines than long complex dynamic URLs with lots of parameters, they are easier to index in the first place and they're also friendlier looking to the end user.

The apache module mod_rewrite converts urls in a certain format to another format, and can be very useful in helping a site with dynamic content to be indexed.

Using this tool you can transform long dynamic URLs into short static URLs.

Enter your dynamic URL and click Rewrite URL to generate your new URL:

For example, you may enter the URL:
http://www.domain.com/cgi-bin/shop.php?cmd=product&category=vehicles&product=bus
and transform it into
http://www.domain.com/shop/vehicles/bus.html

On this page, the wizard will help you make your URL perfect.

Look! The wizard has suggested you a rewritten URL already.

The original URL


The rewritten URL


If you are satisfied with the rewritten URL, click

Otherwise, customize it to fulfill your needs.

Configure the Wizard to get a better URL. The rewritten URL is updated as you change the settings.


Parameters Prefix Delimiters Suffix

Select parameters that should be present in the rewritten URL. By default, only the values of parameters are included. You may add both the name and value to the rewritten URL or remove a parameter completely.

parameter-name
Parameter Value Name & Value None

Tips and hints

  • Do not include names of the parameters since this will complicate the rewritten URL. Include a name only if it is a keyword.
  • Include all the values. If you want to take away a value, first make sure that the value is constant for each original URL covered by the generated rule. Otherwise, we do not recommend to take it away.

It is a tool for improving the form of the rewritten URL and increasing its relevancy.

Enter the prefix:

Tips and hints

  • Include an additional keyword.
  • Differenciate rewrite rules. If you have several rewrite rules for one site, you need to distinguish them. The prefix is a convenient tool for this purpose.

Select the delimiters according to your taste.

Select the delimiter: / slash   – dash   _ underscore

Tips and hints

  • Do not use the delimiters that appear in the values of the parameters.
  • Do not use many slashes as it will decrease the relevancy of the URL.
  • Dash is better than underscore for separating keywords.

You may use the suffix to make the extension conform to the rest of your site. You can also include one or more keywords.

Select the suffix: .html   .php  

Tips and hints

  • Keep .html if not sure.
  • Include a keyword before the extension.

Congratulations! You have made a new rewrite rule.

Please pay attention to the parts marked by different colors. They are values of the parameters. The rewrite rule covers URLs that has the same form, but different colored parts. If you change a part of the rewritten URL, the corresponding part of the same color of the original URL is changed too.

The original URL:

The rewritten URL:


You may check if another URL will be rewritten by this rule and get the corresponding rewritten URL. Using this tool, you may easily get rewritten URLs for your original URLs.

You may also get the original URL by the rewritten URL. This tool converts URLs in both directions.

Original URL:
No corresponding Rewritten URL found!
Rewritten URL:
No corresponding Original URL found!


Rewrite Rule


Rule for .htaccess

The mod_rewrite rule for your site is done. Please follow the instructions below to install it.

  1. First you need to check if the file .htaccess exists in the root of your website.
  2. If the file .htaccess exists, download it from your site, add the lines below to the end of the file, and upload the modified file back to your site. Please make a copy of the original file .htaccess. So if anything goes wrong, you may restore the original file.
  3. If the file .htaccess does not exist, create a new file .htaccess and add the lines below to it. Then upload it to the root of your website. You may delete it if anything goes wrong.

Add the following lines to .htaccess:




How to Use?

The mod rewrite generator is a great tool to assist you in creating mod rewrite rules for your htaccess file.

  1. Copy and paste a dynamic url into the text box above.
  2. Click on 'Rewrite URL' for options and code for your htaccess file.
  3. You now have options where you can change parameters, prefix, delimiters and suffix.
  4. Once you are happy with your choices, click on 'Done'.
  5. The rewrite rule will be generated, which you can copy and paste into your htaccess file.

Share this Tool

If you have enjoyed using this tool, please consider sharing this page with other users, just click on your preferred social media link or copy the webpage from the link below.

URL
Sidebar

Tools & Generators

  • Code Tools
    • Code Beautifiers & Minifiers
      • CSS Minify / Beautify
      • HTML Minify / Beautify
      • Javascript Minify / Beautify
      • Javascript Debfuscator
      • Javascript Obfuscator
      • JSON Minify / Beautify
      • XML Minify / Beautify
    • Code Validators
      • CSS Validator
      • HTML Validator
      • Javascript Validator
      • JSON Validator
      • RegEx Tester
      • XML Validator
      • YAML Validator
    • CSS Preprocessors
      • Compile LESS to CSS
      • Compile SCSS to CSS
      • Compile Stylus to CSS
      • Convert CSS to LESS
      • Convert CSS to SCSS
      • Convert CSS to Stylus
    • CSS Code Generators
      • Gradient Generator
      • Corner Generator
      • Code Optimizer
      • Layout Generator
      • Text Shadow Generator
      • Ribbon Generator
      • Grid Generator
      • Menu Generator
  • Domain Tools
    • Server Tools
      • Cron Job Generator
      • DNS Lookup
      • DNS Propagation Checker
      • .htaccess Error Page Generator
      • Mod Rewrite Generator
    • Code Beautifiers & Minifiers
      • Check GZIP Compression
      • HTTP Header Viewer
      • Facebook Likes
      • Google Malware Checker
      • Source Code Viewer
      • Spider View
      • Twitter Stats
      • URL Shortener
      • What's My IP
      • Whois Lookup
  • Image Tools
    • Image Manipulation
      • Image to Base64
      • Base64 to Image
      • Add Noise to Image
      • Crop Image
      • Image Blur
      • Image Brightness
      • Image Contrast
      • Image Emboss
      • Image Exposure
      • Image Gamma
      • Image Hue
      • Image Saturation
      • Image Vibrance
      • Image to Grayscale
      • Image to Sepia
      • Invert Image
      • Sharpen Image
      • Vintage Image
    • Image Generators
      • Avatar Generator
      • Button Generator
      • Barcode Generator
      • Color Palette Generator
      • Customize SVG Icons
      • Email to Image
      • FavIcon Generator
      • Gradient Generator
      • QR Decoder
      • QR Generator
      • Reflection Generator
      • Rounded Corner Generator
      • Signature to Image
      • SVG Blob Generator
  • Website Tools
    • Website Tools
      • Bootstrap Button Generator
      • Encode HTML Entities
      • Form Generator
      • Lorem Ipsum Generator
      • Password Generator
      • Password Pwned?
      • Password Strength Tester
      • Responsive Website Test
    • Color Tools
      • Blend Colors
      • Color Converter
      • Color Scheme Generator
      • Darken Color
      • Invert Color
      • Lighten Color
    • Other Tools
      • GPS Coordinates
  • Calculators
    • Unit Conversions
      • Angle Conversion
      • Area Conversion
      • Frequency Conversion
      • Fuel Consumption Conversion
      • Length Conversion
      • Mass / Weight Conversion
      • Pressure Conversion
      • Speed Conversion
      • Storage Conversion
      • Temperature Conversion
      • Time Conversion
      • Volume Conversion
  • Sponsors
  • Expand Shortened URLs Heer Law - IP Lawyers Online Password Manager Advertise Here


    About GenerateIt

    GenerateIt.net is a free resource site for webmasters to take some of the hassle out of creating everyday items for their website. Within this website, you will find a number of different online generators, tools and converters that are all free to use. New tools are always being added, so check back often.


    Copyright © 2023 - GenerateIt.net All rights reserved.

    • Privacy Policy
    • Contact Us
    • Donations