ToonMariner
Programmer
Hi people.
I need a little help with mod_rewrite.
I need to redirect all requests to /admincms/index.php to /admincms/index.php and all other requests that are not a file to /index.php
this is what I have in my .htaccess file
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^/admincms/(.*) /admincms/$1 [nc]
RewriteRule !\.(gif|jpg|png|css|pdf)$ /index.php [nc]
Now...
I am running this on my local machine for development (winxp sp2 + all updates) apache 2.0.59. I can only get any form of re-write to work using
RewriteEngine on
RewriteRule !\.(gif|jpg|png|css|pdf)$ /index.php [nc]
in my http.conf file within the virtual server tag. So I cannot access the /admincms/index.php.
ANY attempt to use .htaccess is failing. with the following error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, toonmariner@here.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
I have looked at the error log and it metions max number of re-writes reached.
My first issue is of course getting the regular expressions right so I could really do with some pointers there. Then I need to address the problem of getting this wo work in teh .htaccess file as the live site I will not have access to the httpd.conf file.
Any help here would be VERY much appreciated.
I need a little help with mod_rewrite.
I need to redirect all requests to /admincms/index.php to /admincms/index.php and all other requests that are not a file to /index.php
this is what I have in my .htaccess file
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^/admincms/(.*) /admincms/$1 [nc]
RewriteRule !\.(gif|jpg|png|css|pdf)$ /index.php [nc]
Now...
I am running this on my local machine for development (winxp sp2 + all updates) apache 2.0.59. I can only get any form of re-write to work using
RewriteEngine on
RewriteRule !\.(gif|jpg|png|css|pdf)$ /index.php [nc]
in my http.conf file within the virtual server tag. So I cannot access the /admincms/index.php.
ANY attempt to use .htaccess is failing. with the following error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, toonmariner@here.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
I have looked at the error log and it metions max number of re-writes reached.
My first issue is of course getting the regular expressions right so I could really do with some pointers there. Then I need to address the problem of getting this wo work in teh .htaccess file as the live site I will not have access to the httpd.conf file.
Any help here would be VERY much appreciated.