Build web site

Build an own community web-site. A samurai path. A tutorial on Drupal

Thursday, December 08, 2005

Cleaning the URLs



As you probably noticed, URLs of the default Drupal installation look like http://www.symbianexample.com/?q=node/10. Not a big problem for search engines, but you can easily clean the URLs more to chage them into http://www.symbianexample.com/node/10.

1. Make sure that your site is hosted on Apache web server and your hoster enabled the mod_rewrite module. It is true for virtually all the cheap hosters (including my hoster). If you are not sure, ask your web-site support. It is a very simple and frequent question - they should be able to answer within 5 minutes.

2. If you installed your site in a domain subdirectry, i.e. it is visible like www.somedomain.com/yoursite, Edit the .htaccess file in the root directory of your Drupal installation.
Uncomment "#RewriteBase /drupal" line by changing it into "RewriteBase /yoursite"

3. Go to your site's administer->settings and enable the "Clean URLs" option

Voila, if everything is ok, from now on you should see clean urls in the address bar, without any "?q="


P.S.
I also enabled adding posting for the anonymous users, so you don't need to have an account to test the Drupal features. Come and try posting with the clean URLs yourself

2 Comments:

At 7:47 AM, Anonymous Anonymous said...

whats coming next?

cannot wait longer ;)

 
At 1:25 PM, Blogger Artem said...

So somebody is actually reading this blog :)

At the moment, I am on my Winter vacation. I'll be back home on the 7th of January and will post the next website building step sometime next week.

Sorry for not publishing my plans in advance. Last minutes before leaving for vacation I was overloaded with the process of launching the Googlers' blogs - web site with all the blogs by Google employees syndicated

 

Post a Comment

Links to this post:

Create a Link

<< Home