You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Anthony Smith <an...@fedex.com> on 2009/04/22 17:22:29 UTC

[users@httpd] Help with ReriteBase

My main question is can you have some kind of if logic in the .htaccess
file where if the url is:

http://single-signon <http://single-signon/>  the .htaccess would have
this line RewriteBase  /VCP/zend/

and if the url is http://localhost <http://localhost/>  (ar really
anything else) the .htaccess would have this line RewriteBase  //zend/

Both full urls that I am using will both go to the directory where this
.htaccess file is. 

 

Read further if you need to understand what I am trying to do. 

 

I have an application that for secrity reasons has two ways of accessing
it. However, one way really only forwards you to the other.

 

My url to access my app is something like this: 
http://localhost/zend/MyApp

But the application will forward you to the  external security page if
it finds you are not logged in (via php session) After you get logged in
you will now access the same application via a url like this 
http://single-signon/VCP/zendMyApp 

 

Undet he covers, http://single-signon/VCP is a url that really just
translates to http://localhost <http://localhost/>  that is not
controlled by me, but another group. This works with the current
.htaccess below.

 

 

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -s [OR]

RewriteCond %{REQUEST_FILENAME} -l [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteBase  /zend/

RewriteRule ^.*$ - [NC,L]

RewriteRule ^.*$ index.php [NC,L]

 

 

Anthony Smith
Senior Strategic Sales Analyst

Sales Incentive Info Analytics
901-434-4696

   

 "I will make every FedEx experience outstanding." 

 


Re: [users@httpd] Help with ReriteBase

Posted by André Warnier <aw...@ice-sa.com>.
When you send a mail to a forum such as this, please turn off your smart 
html compose features (send plain text only).  Otherwise the result is 
very difficult to read, specially if there are URLs in it.


Anthony Smith wrote:
> My main question is can you have some kind of if logic in the .htaccess
> file where if the url is:
> 
> http://single-signon <http://single-signon/>  the .htaccess would have
> this line RewriteBase  /VCP/zend/
> 
> and if the url is http://localhost <http://localhost/>  (ar really
> anything else) the .htaccess would have this line RewriteBase  //zend/
> 
> Both full urls that I am using will both go to the directory where this
> .htaccess file is. 
> 
>  
> 
> Read further if you need to understand what I am trying to do. 
> 
>  
> 
> I have an application that for secrity reasons has two ways of accessing
> it. However, one way really only forwards you to the other.
> 
>  
> 
> My url to access my app is something like this: 
> http://localhost/zend/MyApp
> 
> But the application will forward you to the  external security page if
> it finds you are not logged in (via php session) After you get logged in
> you will now access the same application via a url like this 
> http://single-signon/VCP/zendMyApp 
> 
>  
> 
> Undet he covers, http://single-signon/VCP is a url that really just
> translates to http://localhost <http://localhost/>  that is not
> controlled by me, but another group. This works with the current
> .htaccess below.
> 
>  
> 
>  
> 
> RewriteEngine On
> 
> RewriteCond %{REQUEST_FILENAME} -s [OR]
> 
> RewriteCond %{REQUEST_FILENAME} -l [OR]
> 
> RewriteCond %{REQUEST_FILENAME} -d
> 
> RewriteBase  /zend/
> 
> RewriteRule ^.*$ - [NC,L]
> 
> RewriteRule ^.*$ index.php [NC,L]
> 
>  
> 
>  
> 
> Anthony Smith
> Senior Strategic Sales Analyst
> 
> Sales Incentive Info Analytics
> 901-434-4696
> 
>    
> 
>  "I will make every FedEx experience outstanding." 
> 
>  
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org