danbopes Posted November 11, 2011 Share Posted November 11, 2011 This is the directory structure I have: /var/www/demo1 /var/www/app The document root for demo1.example.com goes to /var/www/demo1, (Virtual host), and I also have an Alias in demo1 (/app), to goto /var/www/app. In my app folder, I have the following .htaccess file: RewriteEngine on RewriteCond $1 !^(index\.php|images|user_guide|assets|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] In essence /app/test, should redirect to /app/index.php/test. This is what I get tho: 404 Not Found: /var/www/app/index.php/test It does exist, but I think it's trying to tell the browser to go there, and it should be going to /app/index.php/test. Link to comment https://forums.phpfreaks.com/topic/250941-problem-with-rewrite-and-alias/ Share on other sites More sharing options...
requinix Posted November 11, 2011 Share Posted November 11, 2011 The .htaccess in the previous step is incorrectly redirecting to /var/www/app/test. What's that file look like? And in the future, if you have a thread on a subject already then just keep using it until the problem is resolved. Don't need multiple threads for the same underlying problem. Link to comment https://forums.phpfreaks.com/topic/250941-problem-with-rewrite-and-alias/#findComment-1287407 Share on other sites More sharing options...
danbopes Posted November 11, 2011 Author Share Posted November 11, 2011 This is a different issue entirely, no longer is about multiple mod_rewrites, it's about mod_alias working together with mod_rewrite. <VirtualHost *:80> ServerName demo1.example.com ServerAlias www.demo1.example.com DocumentRoot "/var/www/demo1" Alias /app "/var/www/app" </VirtualHost> Link to comment https://forums.phpfreaks.com/topic/250941-problem-with-rewrite-and-alias/#findComment-1287413 Share on other sites More sharing options...
requinix Posted November 11, 2011 Share Posted November 11, 2011 What if you don't use quotes on the Alias? Alias /app /var/www/app Link to comment https://forums.phpfreaks.com/topic/250941-problem-with-rewrite-and-alias/#findComment-1287416 Share on other sites More sharing options...
danbopes Posted November 11, 2011 Author Share Posted November 11, 2011 No change Link to comment https://forums.phpfreaks.com/topic/250941-problem-with-rewrite-and-alias/#findComment-1287426 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.