Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey Guys, I really need your help with writing seo url. I'm new to apache, mod rewrite and .htaccess and after a week without success.

I want to change: to

What should my link (tigers) be? how would i set this that it doesn't cause a .css|.jpg|.png errors. My .htaccess file is located in /soccer/ folder.

Please help or direct me to where i can fine help.

share|improve this question
RewriteEngine on
RewriteBase /soccer/
RewriteCond %{QUERY_STRING} (.*)name=(\w+)(.*)
RewriteRule teams.php %2?%1%3
share|improve this answer

In principe you set the rewriting rule only to affect the PHP files.

The CSS, images, and so on, should be in a separate directory, e.g.: /media/css, /media/images, and the HTML output should contain a direct link to them, e.g.

<link type="stylesheet" href="/media/style.css">

You can check the HTML output and check whether the references are correct or not. You can also have a look at your errors.log file from your web server.

share|improve this answer

is a pretty decent starting place for those wanting to learn some mod-rewrite basics.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.