Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

.htaccess file

0 views
Skip to first unread message

UrKo

unread,
Jan 5, 2010, 4:23:44 PM1/5/10
to
I have this rewrite within my .htaccess file which resides in the root
of a web store i'm hoping to get up soon.

# Redirect for search results
# RewriteRule ^search-results/find-(.*)/all-words-(on|off)/page-
([0-9]+)/?$
# index.php?SearchResults&SearchString=$1&AllWords=$2&Page=$3 [L]
# RewriteRule ^search-results/find-?(.*)/all-words-(on|off)/?$
# index.php?SearchResults&SearchString=$1&AllWords=$2&Page=1 [L]

When I un comment the last four lines, I get server error 500. With
the lines commented I get no search results as I get my error page not
found message.

Any help greatfully received.

Steve

Jerry Stuckle

unread,
Jan 5, 2010, 4:41:08 PM1/5/10
to

Wrong newsgroup. Try an Apache newsgroup, such as alt.apache.configuration.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

urko2376

unread,
Jan 5, 2010, 4:43:21 PM1/5/10
to
> jstuck...@attglobal.net
> ==================

Thanks Jerry, posted this to both newsgroups at the same time as
wasn't sure which one to use.

Steve

Luuk

unread,
Jan 5, 2010, 5:38:30 PM1/5/10
to
Op 5-1-2010 22:41, Jerry Stuckle schreef:

> UrKo wrote:
>> I have this rewrite within my .htaccess file which resides in the root
>> of a web store i'm hoping to get up soon.
>>
>> # Redirect for search results
>> # RewriteRule ^search-results/find-(.*)/all-words-(on|off)/page-
>> ([0-9]+)/?$
>> # index.php?SearchResults&SearchString=$1&AllWords=$2&Page=$3 [L]
>> # RewriteRule ^search-results/find-?(.*)/all-words-(on|off)/?$
>> # index.php?SearchResults&SearchString=$1&AllWords=$2&Page=1 [L]
>>
>> When I un comment the last four lines, I get server error 500. With
>> the lines commented I get no search results as I get my error page not
>> found message.
>>
>> Any help greatfully received.
>>
>> Steve
>
> Wrong newsgroup. Try an Apache newsgroup, such as
> alt.apache.configuration.
>

But this IS alt.apache.configuration ?
--
Luuk

HansH

unread,
Jan 6, 2010, 4:52:18 PM1/6/10
to
"UrKo" <urko...@googlemail.com> schreef in bericht
news:55cb2e3b-c2ba-4444...@m26g2000yqb.googlegroups.com...
FOUR lines ... it should be TWO:
RewriteRule takes TWO parameter and an optional flag.

If you want 4 lines for readability fine, try

RewriteRule ^search-results/find-(.*)/all-words-(on|off)/page-([0-9]+)/?$ \
index.php?SearchResults&SearchString=$1&AllWords=$2&Page=$3 [L]
RewriteRule ^search-results/find-?(.*)/all-words-(on|off)/?$ \
index.php?SearchResults&SearchString=$1&AllWords=$2&Page=1 [L]

HansH


"Álvaro G. Vicario"

unread,
Jan 7, 2010, 4:19:17 AM1/7/10
to
El 05/01/2010 22:23, UrKo escribi�:

1. See Apache's error log for the exact error message.
2. You need to enable URL rewriting

RewriteEngine On


Please note that you want to use an Apache module called mod_rewrite.
It's not PHP and it's not htaccess.


--
-- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programaci�n web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

UrKo

unread,
Jan 7, 2010, 3:46:53 PM1/7/10
to
On Jan 7, 9:19 am, "Álvaro G. Vicario"

<alvaro.NOSPAMTH...@demogracia.com.invalid> wrote:
> El 05/01/2010 22:23, UrKo escribi :
>
> > I have this rewrite within my .htaccess file which resides in the root
> > of a web store i'm hoping to get up soon.
>
> > # Redirect for search results
> >    # RewriteRule ^search-results/find-(.*)/all-words-(on|off)/page-
> > ([0-9]+)/?$
> >    # index.php?SearchResults&SearchString=$1&AllWords=$2&Page=$3 [L]
> >    # RewriteRule ^search-results/find-?(.*)/all-words-(on|off)/?$
> >    # index.php?SearchResults&SearchString=$1&AllWords=$2&Page=1 [L]
>
> > When I un comment the last four lines, I get server error 500.  With
> > the lines commented I get no search results as I get my error page not
> > found message.
>
> > Any help greatfully received.
>
> 1. See Apache's error log for the exact error message.
> 2. You need to enable URL rewriting
>
>         RewriteEngine On
>
> Please note that you want to use an Apache module called mod_rewrite.
> It's not PHP and it's not htaccess.
>
> --
> --http://alvaro.es- lvaro G. Vicario - Burgos, Spain

> -- Mi sitio sobre programaci n web:http://borrame.com
> -- Mi web de humor satinado:http://www.demogracia.com
> --

Thanks for the advice. I put the lines over 2 lines instead of four
and it worked fine.

Steve

0 new messages