Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have this .htaccess in a po_systems folder of my website

# Set up mod_rewrite
RewriteEngine on
RewriteRule ^build_system/([^/]+)/([^/]+)/?$ /po_systems/build_system.php?business_id=$1&system_id=$2

and when I visit the URL:

http://somesite.localhost/po_systems/build_system/61/65F92751

the get variables are not displaying. I changed the rule to

RewriteRule ^build_dfdsadsafas/([^/]+)/([^/]+)/?$ /po_systems/build_system.php?business_id=$1&system_id=$2

to verify it was getting there and I still don't get the get variables, so I tried to add junk at the beginning to verify the htaccess is working

sssRewriteRule ^build_system/([^/]+)/([^/]+)/?$ /po_systems/build_system.php?business_id=$1&system_id=$2

and I got this

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

So basically my question is why is this rule

RewriteRule ^build_system/([^/]+)/([^/]+)/?$ /po_systems/build_system.php?business_id=$1&system_id=$2

is not working for catching this URL

 http://somesite.localhost/po_systems/build_system/61/65F92751d
share
    
Try renaming your php file to something different than the 'virtual folder' you are creating. Loops like Apache's MultiViews it matching the url to the php file, bypassing the rewriterules. –  Gerben Nov 7 '11 at 16:04
    
@Gerben - what do you mean the virtual folder i am creating ...the po_systems folder is a real folder...am i missing something –  Tamer Nov 7 '11 at 17:29
    
I mean 'build_system' in your url '/po_systems/build_system/61/65F92751d'. Apache's multiview will see the build_system.php, and will assume you meant this file. So it will load this url /po_systems/build_system.php/61/65F92751d bypassing your rewrite rules. just rename the php file to e.g. build_system2.php –  Gerben Nov 7 '11 at 18:11
comments disabled on deleted / locked posts

migration rejected from stackoverflow.com Jan 23 at 11:50

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Stephen Ostermiller Jan 23 at 11:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because it is unlikely to help anybody else. Examples include individual website reviews for SEO purposes and general website troubleshooting." – Stephen Ostermiller
If this question can be reworded to fit the rules in the help center, please edit the question.