Re: Re: Preserving URL after redirect?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Apologies to Shawn for sending this directly to him and not the entire list, that was an accident. Here it is for the list.)

Shawn McKenzie wrote:
<SNIP!>

Rewrite rule would look something like:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?path=$1 [QSA,L]
</IfModule>

-Shawn


My httpd.conf file has this

LoadModule rewrite_module
libexec/apache2/mod_rewrite.so

But your .htaccess sample has

IfModule mod_rewrite.c

Is that okay?

Also, it does look like .htaccess is enabled in
httpd.conf with entries like:

#
# AllowOverride controls what directives may be
placed in .htaccess files.
# It can be "All", "None", or any combination of
the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All

#
# AccessFileName: The name of the file to look for
in each directory
# for additional configuration directives.  See
also the AllowOverride
# directive.
#
AccessFileName .htaccess

But when I tried out Shawn's file I got 404 errors
on the URLs (after renaming the wi directory, to
be sure the .htaccess file was in control.)

Any suggestions would be greatly appreciated.

I'm going through a pretty good page on htaccess files at

http://corz.org/serv/tricks/htaccess2.php

But it starts off with "Make no mistake, mod_rewrite is complex."

*gulp!*

Skip

--
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison, WI 53703
608-250-2720
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and versatile
PHP/MySQL, AJAX & DHTML development framework.
http://phpenguin.bigskypenguin.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux