Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 3 of 3

This is a discussion on Failed to rewrite in the Design and Development forum
I use rewriterule as following: RewriteRule ^galleryitem_([\d\w]+).php galleryitem.php?categoryid=$1 But when i vist the page, galleryitem_1.php , got the following error http://test.china-on-site.com/mod_rewrite.jpg The rule can work ...

  1. #1
    JPC Member
    Join Date
    Dec 2010
    Posts
    10

    Question Failed to rewrite

    I use rewriterule as following:
    RewriteRule ^galleryitem_([\d\w]+).php galleryitem.php?categoryid=$1

    But when i vist the page, galleryitem_1.php , got the following error
    http://test.china-on-site.com/mod_rewrite.jpg

    The rule can work well on my local server. But failed to run on the server of Jaguar PC.
    And I had checked the phpinfo on the server, it had loaded the module "mod_rewrite".

    Waiting for reply, thanks!
    0-----------Sherry

  2. #2
    JPC Dream Team
    Join Date
    May 2007
    Location
    JPC
    Posts
    635
    It suggests that Apache is unable to find the destination file of the redirect. Make sure file is there and its permission/ownership is correct.
    Jawad A.
    JaguarPC
    Site Links:
    Knowledge Base | Network Status

  3. #3
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    You may need to put a slash after the caret in the rewrite rule, as follows:

    Code:
    RewriteRule ^/galleryitem_([\d\w]+).php galleryitem.php?categoryid=$1
    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Tags for this Thread

Bookmarks

Posting Permissions

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