Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    vc1
    vc1 is offline
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Help with RewriteRule

    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!

  • #2
    Regular Coder
    Join Date
    May 2011
    Posts
    240
    Thanks
    1
    Thanked 56 Times in 55 Posts
    Code:
    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 for more details.

  • Users who have thanked gvre for this post:

    vc1 (06-07-2011)

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    This hasn't a thing to do with PHP, moving to Apache configurations.
    Also, what is the actual 'xyz' you're inputting?

  • #4
    vc1
    vc1 is offline
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    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 )

  • #5
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Quote Originally Posted by vc1 View Post
    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?

  • #6
    vc1
    vc1 is offline
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    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


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •