Multiple conditions

CLOSED

Multiple conditions

Postby bubbagump » Wed Feb 13, 2013 8:49 pm

So I have a site that is a mix of Wordpress and Zend. One of our marketing folks thought it would be easy and fantastic to create a URI to track promos which redirects to the main site. Here is the basic rewrites I have currently:

Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_URI} !main [NC]
RewriteRule !\.(js|ico|gif|jpg|png|css|zip|pdf|xml|html|gz|flv|swf|mp4)$ /index.php
RewriteRule ^(files).*$ index.php

<Directory /pub/www/main>
RewriteEngine On
RewriteBase /main/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /main/index.php [L]
</Directory>


I have tried several mutations of the top section that worked in an .htaccess in my testing directory in ~myuser, but not in the actual Vhost definition. Most notably:

Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_URI} springsavings
RewriteRule ^(.*)$ main [L]
RewriteCond %{REQUEST_URI} !main [NC]
RewriteRule !\.(js|ico|gif|jpg|png|css|zip|pdf|xml|html|gz|flv|swf|mp4)$ /index.php
RewriteRule ^(files).*$ index.php


All I really want this to add functionally is if the user calls /springsavings it redirects to /main... or even / which then in turn directs to main via some code in index.php. However it seems that code doesn't really do anything at the moment.
bubbagump
 
Posts: 5
Joined: Tue May 22, 2007 9:49 am

Return to New Threads/Problems

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron