Welcome Guest, Not a member yet? Register   Sign In
Central .htaccess file for multiple files?
#4

[eluser]mvdg27[/eluser]
Hi guys,

Thanks for the replies. I understand the point of the ht* files being blocked. Since I have access to the httpd.conf file, I want to add my htaccess directives to this file.

In doing so, I ran into some problems. I currently have this:

Code:
# alias to my central CMS (admin part)
Alias /cms /home/CMS/cms
# alias to my central CMS (website part), that handles all website requests. All requests to index.php should be directed to this file
Alias /index.php /home/CMS/website/index.php

# copy from my htaccess file with changes according to this website:
# http://www.webmasterworld.com/apache/3335621.htm
RewriteEngine on
RewriteCond $1 !^(/index\.php|/cms)
RewriteRule ^(.*)$ /index.php/$1 [L]

Now this works if I type www.mydomain.com/index.php, but if I use the domain withour index.php, or something like: www.mydomain.com/foo/bar I get:

Code:
Not Found

The requested URL /foo/bar was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I can tell that the rewrite rules are executed, since omitting '/cms' in the statement results in an error.

Any ideas? Thanks in advance!


Messages In This Thread
Central .htaccess file for multiple files? - by El Forum - 08-13-2010, 07:40 AM
Central .htaccess file for multiple files? - by El Forum - 08-13-2010, 09:13 AM
Central .htaccess file for multiple files? - by El Forum - 08-13-2010, 10:52 AM
Central .htaccess file for multiple files? - by El Forum - 08-16-2010, 04:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB