httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Gushlow <nick.gush...@westcoast.co.uk>
Subject [users@httpd] Rewrite Problems
Date Tue, 22 Feb 2005 19:19:30 GMT
Hi Guys,

I've been trying to solve this for days, I've read all the pages I can
find and had help from #apache but still no joy.



I currently have a site (a vhost) that does the following rewrite:

http://domain/club/name    -->     http://domain/index.php?club=name

using the following rules:

        <Directory "/">
                Options Indexes Includes FollowSymLinks
                AllowOverride None
                Allow from from all
                Order allow,deny
                RewriteEngine on
                RewriteBase /
                RewriteCond %{HTTP_HOST} www.domain.co.uk [OR]
                RewriteCond %{HTTP_HOST} domain.co.uk
                RewriteCond %{HTTP_HOST} domain
                RewriteRule /club/(.+)$ /index.php?club=$1
        </Directory>



I want to modify the site so that the site will do this:

http://domain/name    -->    http://domain/index.php?club=name


so I setup the following rules, but they don't work.  I'm sure this
should be relatively simple but I damned if I can figure it out!

        <Directory "/">
            Options Indexes Includes FollowSymLinks
            AllowOverride None
            Allow from from all
            Order allow,deny
            RewriteEngine on
            RewriteBase /
            RewriteCond %{HTTP_HOST} www.domain.co.uk [OR]
            RewriteCond %{HTTP_HOST} domain.co.uk
            RewriteCond %{HTTP_HOST} domain
	    RewriteCond %{REQUEST_URI} !^.*\.php
	    RewriteRule /(.*)$ /index.php?club=$1 [R,L]
        </Directory>


Looking into the logs, instead of appending name onto the end of club=
it actually appends var/www/htdocs/name

Can anyone point me in the direction of fixing this?

Thanks,

Nick.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message