1,105,581 Community Members

htaccess Issues with Rewrites

Member Avatar
Junior Poster
140 posts since Feb 2011
Reputation Points: 9 [?]
Q&As Helped to Solve: 7 [?]
Skill Endorsements: 0 [?]

I am in the process of trying to customize my site's URLs and I'm running into an issue with my htaccess file, specifically the newest one I am trying to add. Here's the file --

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]
RewriteRule ^/retail/(.*)$ retail.php?id=$1

The first condition removes the extensions from the site so that I can go to index instead of index.php. This is working great with no issues. It's the next one down that's causing problems. it's basically not working at all. So when I visit my site and go to domain.com/retail/100, it's displaying a 500 Error.

I'm not as familiar with apache and customizing it through the htaccess file so if you all could tell me what I'm doing wrong it would be much appreciated! Thanks! :)

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: