Buyocat Posted September 18, 2006 Share Posted September 18, 2006 Hi, I can't for the life of me figure out where the problem lies, it is most likely in my httpd.conf file. What I want is for directory A to have mod rewrite active while directory B (most likely a sub-directory of A) has mod rewrite off. I have tried accomplishing this with .htaccess files or with directives in the .conf file, but with no luck; all I can do is turn it on or off for everything. I do this by simply including the rewrite rules and commands at the end of my httpd.conf file... When I try encasing the rewrite commands in a directive they do not seem to work. Below is the important stuff in the conf:[CODE]<Directory /> Options FollowSymLinks AllowOverride None Order Deny,Allow Deny from all</Directory><Directory "/A"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all IndexIgnore *.svn *.cvs *.jpg *.gif *.ico *.htaccess .*</Directory><FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All</FilesMatch>RewriteEngine on# Some rules follow# When I put RewriteEngine ... into a directive, such as <Directory A># nothing happens[/CODE]The .htaccess files have either a copy of the RewriteEngine portion, cut from the httpd.conf or a "RewriteEngine off" command; either way they don't seem to do anything; I'm fairly certain they're being read as when I write a .htaccess file with the following in it...[CODE]foobar[/CODE]I am confronted with the server error page.Thanks for your help! Quote Link to comment Share on other sites More sharing options...
vivek Posted September 21, 2006 Share Posted September 21, 2006 HelloI want to know that how can it possible to make a dynamic subdomain using .htaccess file and mod_rewrite ?My idea is,I want to redirect http://subdomain.mydomain.com to http://mydomain.com/redirect.php?id=subdomainHow can this possible in apache's mod rewrite ? Quote Link to comment 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.