jonsjava Posted August 4, 2014 Share Posted August 4, 2014 I have an open source project (https://github.com/jonsjava/patchdashboard) Here's my .htaccess for this: RewriteEngine On RewriteBase "/pm/" RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule /patches/server/(.*)$ patch_list?server= [QSA,NC,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule /packages/server/(.*)$ packages?server= [QSA,NC,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule /search/exact/(.*)$ search?package=&exact=true [QSA,NC,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule /search/(.*)$ search?package= [QSA,NC,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule /rewrite_check/(.*)$ rewrite_check.php [QSA,NC,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]*)$ index.php?page= [QSA,L] Basically, I want it so that no matter where they drop this script ("/", "/patch_dashboard/", "/pb/", etc.) it will redirect as intended. In the example I provided, the document root is "/pm/". When I try to hit a page ("http://dev2.curltools.com/pm/patches/server/demo1" for example), it gives a 404. If I hard code in each rule the base path, it just redirects everything to the main page. Any help would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/290265-help-with-my-open-source-script-htaccess-is-the-only-broke-part/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.