jacko310592 Posted December 6, 2009 Share Posted December 6, 2009 hey guys, i found on the net that its supposed to be possible to use multiple RewriteEngine's, but with the following code its not working: #Allows Album page without '.php' ext Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^gallery/album?([a-zA-Z]+)?$ gallery/album.php?$1 [NC,L] #Redirects all pages to Maintenance page Options +FollowSymLinks RewriteEngine Off RewriteBase / RewriteCond %{REQUEST_URI} !^/images/.*$ RewriteCond %{REQUEST_URI} !^/css/.*$ RewriteCond %{REQUEST_URI} !^/errors/maintenance\.php$ RewriteRule ^(.*)$ /errors/maintenance.php [R=307,L] at the moment its just setting both of them to 'Off' can anyone suggest why this is happening? thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/184130-rewriteengine/ Share on other sites More sharing options...
trq Posted December 6, 2009 Share Posted December 6, 2009 i found on the net that its supposed to be possible to use multiple RewriteEngine's You either misinterpreted what you found or where mislead. at the moment its just setting both of them to 'Off' can anyone suggest why this is happening? I have not tested this theory, but it would seem obvious that the last directive found is the one that is excepted. Quote Link to comment https://forums.phpfreaks.com/topic/184130-rewriteengine/#findComment-972228 Share on other sites More sharing options...
jacko310592 Posted December 6, 2009 Author Share Posted December 6, 2009 someone posted it here, 3rd post down http://www.webmasterworld.com/forum92/197.htm and thats what i thought :/ but just wondered if there was a way of doing it, perhaps somthing i was missing Quote Link to comment https://forums.phpfreaks.com/topic/184130-rewriteengine/#findComment-972235 Share on other sites More sharing options...
trq Posted December 6, 2009 Share Posted December 6, 2009 but just wondered if there was a way of doing it, Why? There is absolutely no need for it. Quote Link to comment https://forums.phpfreaks.com/topic/184130-rewriteengine/#findComment-972457 Share on other sites More sharing options...
jacko310592 Posted December 6, 2009 Author Share Posted December 6, 2009 so i can keep codes on stand-by incase i need to implement them sometime, without the need of having any of these tempuary codes stored within a different file Quote Link to comment https://forums.phpfreaks.com/topic/184130-rewriteengine/#findComment-972462 Share on other sites More sharing options...
mrMarcus Posted December 7, 2009 Share Posted December 7, 2009 if by "stand-by" you mean not being used whatsoever at the moment, then you can also just comment those lines out using #: #RewriteRule ^blah/([a-z]+)/?$ blah.php?foo=$1 [L] the # is the same as // in PHP (or # in PHP for that matter). Quote Link to comment https://forums.phpfreaks.com/topic/184130-rewriteengine/#findComment-972818 Share on other sites More sharing options...
jacko310592 Posted December 7, 2009 Author Share Posted December 7, 2009 ahh, great idea mrMarcus, thanks Quote Link to comment https://forums.phpfreaks.com/topic/184130-rewriteengine/#findComment-972847 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.