0

Hi,

I've been looking around for tutorials on mod_rewrite but they may be not very easy (from scratch) or I'm not that smart. Bet for the last! :-) As everyone, I'm on a rush, not for this but for everything, so I can't give it the time I should.

Ok, I'd love if anyone may give me a clue on the rule for this:

http://localhost/_jazz/marcas/Soliloqui
instead of
http://localhost/_jazz/marcas/?marca_actual=Soliloqui

I may have some problems in the configuration but I don't know what else to do/ check. I have both in httpd.conf
1.- LoadModule rewrite_module modules/mod_rewrite.so
2.- AddModule mod_rewrite.c
3.- <Directory "C:/webroot"> Options All ...

And in .htaccess
1.- RewriteEngine on
2.- Options +FollowSymlinks
3.- RewriteBase /

... obviously without the numbers ;-)

And I'm working on '_jazz' subfolder in root (what is localhost). The .htaccess is within the '_jazz' folder.

Any questions and, specially solutions ;-) are more than welcome.

Thanx in advance,
hip

1
Contributor
3
Replies
4
Views
12 Years
Discussion Span
Last Post by hip
0

To prove I'm working on it:

I've just tried (after @#@?!& times)
rewriterule ^marcas/(.*)$ marcas/index.php?marca_actual=$1 [L]

It brings up the page it should but doesn't pass the variable values (I'm using $_GET as for PHP 4.3)

I'm getting closer. Let it be a race. Thinking of snails? :-)

Thanx again, just in case,
hip

0

More hip.

In my php script the value for $_GET is 'index.php' (!!!)

Then I have tried:
rewriterule ^marcas/(.*)$ marcas/?marca_actual=$1 [L]
instead of
rewriterule ^marcas/(.*)$ marcas/index.php?marca_actual=$1 [L]

and it gives me 'Internal Server Error'.

Keep on working!!! (until going to eat something and sleep, for I've been for over 12 hours now not-a-single-glass-of-water) Computing makes me feel really stupid sometimes) :mad:

Thanx,
hip

0

Feeling like on coke. And I'm not as I've being on a pretty healthy diet for almost have a year and even quitted smoking a month ago. Well, a few beers from time to time...

Well, I got it:
rewriterule ^marcas/([0-9a-zA-Z]+)$ marcas/index.php?marca_actual=$1 [L]

I don't know why or how it works but it does now. I'll probably need some more help on this very issue. So I think I'll come back for, if I can solve this on my own, posting and replying to myself, just think of the lot we can do together ;-D.

Thanx for reading, really,
hip

(and now out to eat and back to sleep until tomorrow. Happy ending)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.