...

View Full Version : Help with RewriteRule



vc1
06-06-2011, 02:56 PM
Hi,
I am working on a OsCommerce application. I would like some help on the URL rewrite.
My requirement is that when users type in
www.domain.com/seller/xyz
or
www.domain.com/seller/xyz/
the underlying page www.domain.com/seller.php?s=xyz should be displayed

I have the following code on the .htaccess file in the root

RewriteEngine on
RewriteRule ^seller/([A-Za-z0-9]+)$ seller.php?s=$1 [QSA,L]

But I get "Oops this link appears to be broken" 404 error message on IE

Could someone please help...thanks!

gvre
06-06-2011, 04:04 PM
RewriteRule ^seller/([A-Za-z0-9]+)/?$ seller.php?s=$1 [QSA,L]
if it's not working, try to activate the rewrite log for more info. Check the manual of mod_rewrite (http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritelog) for more details.

Fou-Lu
06-06-2011, 04:31 PM
This hasn't a thing to do with PHP, moving to Apache configurations.
Also, what is the actual 'xyz' you're inputting?

vc1
06-06-2011, 04:51 PM
This hasn't a thing to do with PHP, moving to Apache configurations.
Also, what is the actual 'xyz' you're inputting?
sorry about the category..

the "xyz" is the sellers shopname (alphanumeric )

Fou-Lu
06-06-2011, 07:11 PM
sorry about the category..

the "xyz" is the sellers shopname (alphanumeric )

Any spaces or special characters?
BTW, what's the results of gvre's suggestion?

vc1
06-07-2011, 11:52 PM
Any spaces or special characters?
BTW, what's the results of gvre's suggestion?
Hi, Thanks for the help. Just now got the time to work on it and now everything is working perfectly. I had to put the code in the httpd.config ....but the code helped



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum