Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


htaccess rewrite url

Posted on 2009-04-21
Medium Priority
Last Modified: 2012-05-06
hello there,
I would like to add rewrite to my site.. right now there are 4 sections like this


how can I make those links like this instead

Question by:XK8ER
1 Comment
LVL 12

Accepted Solution

lexxwern earned 2000 total points
ID: 24201717
From: http://www.bloghash.com/2006/12/apache-mod_rewrite-examples/

1. Description - Your current pages are called using index.php with parameter of url i.e
and instead of this URL, you want a nice and easy to read URL like http://www.example.com/category
Solution - Put the following lines in your .htaccess file.

RewriteEngine on
RewriteRule ^([^/\.]+)/?$ /index.php?url=$1 [L]

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month11 days, 3 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question