Enable Mod_rewrite
The Apache mod_rewrite module makes it easy for you to use Google friendly URLs for your dynamic web pages which are human readable and meaningful rather than an obscure string of mumbo jumbo.
For example: this web page has the path /topic/enable-mod_rewrite rather than its machine URL which is /node/519. Check it out and see! Though this rewrite isn't using the apache module, the concept is the same.
To enable Mod_wewrite on Ubuntu is simple enough.
Enable mod_rewrite
sudo a2enmod rewrite
With your favourite editor edit the line in your apache config that says
AllowOverride none
to
AllowOverride all
I use vim but you can easily use gedit or nano.
To edit my default http config file I ran this in my command line and made the edit above.
sudo vim /etc/apache2/sites-available/default
Now you need to Restart Apache:
sudo /etc/init.d/apache2 restart
Now you're done!
To check your mod_rewrite is enabled
sudo apache2ctl -M
This should output your enabled modules.
Next you'll need to learn how to rewrite your URLs so they're pretty URLs. There's a good tutorial here on sitepoint.
New forum topics
- Sydney web developer wanted
- WANTED Web Developer / Designer- unique and exciting project in Perth (The birth of a new brand)
- Outsource programming work to my people India - great rates, reliable work.
- Looking for part-time Web development jobs in Melbourne
- PHP programmer available for contract and freelance work.
- A Small Easy Project For Programmer
- PHP, MySQL, Apache, Linux (LAMP) Developer Available (Sydney West)
- Selenium - Testing IDE for Firefox
- FWD Freelancers Listing
- Australian Drupal Developers
- Seeking Ruby on Rails developers - blue chip client; great rates
- Drupal Australia IRC
- Melbourne/Adelaide based developer required
- Looking to keep a couple of my team members busy
- Interested in working for equity rather than cash?

Drupal mod_rewrite doesn't work
If you're stuck because Drupal's clean urls isn't working you can disable it after you log in by appending this query to the root URL:
/?q=admin/settings/clean-urls
That will get you to the form that disables it.
Post new comment