#1  
Old 30th January 2010, 04:19
u4david u4david is offline
Member
 
Join Date: Nov 2009
Posts: 99
Thanks: 1
Thanked 0 Times in 0 Posts
Question .htaccess url rewrite

I have domain
in the web root of this domain I have subdirectory.

I have redirected the domain to go straight in that subdirectory.
Using the redirect option in the ispconfig3 domain set up/no flag.


I have installation of web application an need to configure it (phpGedview Component Settings).
The configuration requires to enter the location of the application.

Using relative format in this case:
domain/application/

And then the configuration automatically creates absolute path based on the relative location for other aspect of this component to work.
/var/www/domain/aplication

But the absolute poth in real time is:
/var/www/domain/subdirectory/application

So I get errors that server can not find /var/www/domain/application/executable
because it is really in /var/www/domain/subdirectory/application/executable
can i use some sort of url rewrite to fix this issue with absolute path?
so when is redirected in to the subdirectory automatically it will also rewrite the url with the sub domain?
Or what would be the proper approach to this?

Thank you.

BTW: did I mention that I love ISPconfig3!Try your dns with ISPconfig3 it is fast and configuration changes are almost instant compare to isp (6hr to 48hrs).( I highly recommend netfirms for domain management)

Last edited by u4david; 30th January 2010 at 16:45.
Reply With Quote
Sponsored Links
  #2  
Old 30th January 2010, 09:56
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,611 Times in 4,422 Posts
Default

Quote:
Or what would be the proper approach to this?
Remove the subdomain and then create a new website (domain) for the subdomain if a subdomain shall have its own directory.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 30th January 2010, 16:09
u4david u4david is offline
Member
 
Join Date: Nov 2009
Posts: 99
Thanks: 1
Thanked 0 Times in 0 Posts
Question Not a subdomain

not sub-domain.

but subdirectory in the web root.

Instead of typing:
http://domain/subdirectoryinwebroot

I have directed the domain straight in the subdirectoryinwebroot
so when you type:
http://domain

it automatically goes to that subdirectory.
Basically using redirection in the Ispconfig3/no flag, I kid-of stepped the web root one subfolder down the tree.
But I need to use some sort of url rewrite to reflect this in the url so it actualy shows its self in URL the way it really is.
(so when you go to http://domain it will get rewrite in the address bar to http://domain/subdirectory) and I think it will also fix the absolute path.
.htaccess I think should have some rewrite in it to do so.

It have its purpose to keep thing organised in the web root .

Not a sub-domain question do not confuse that.
Reply With Quote
  #4  
Old 30th January 2010, 16:16
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,611 Times in 4,422 Posts
Default

This was not a good decision as this means that you can not install any software into this subdirectory that uses .htaccess files or rewrite rules like most cms systems do as the rewrite rules in the .htaccess file will conflict then with the rewrite rules used to redirect the domain to the subdirectory.

The best solution is to remove the subdirectory and install the application directly into the web root.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 30th January 2010, 16:50
u4david u4david is offline
Member
 
Join Date: Nov 2009
Posts: 99
Thanks: 1
Thanked 0 Times in 0 Posts
Default

i have no problem with installing cms

coze the cms thinks that the subdirectory is the web root.

all I try to fix is to rewrite the url to what is in real time.
domain/includingsundirectory/

there is no other .htaccess

btw: where is the config file that is connected with the domain rewrites option in ISPconfi3/no rewrite or no flag or R or L or L,R?
Reply With Quote
  #6  
Old 30th January 2010, 17:21
u4david u4david is offline
Member
 
Join Date: Nov 2009
Posts: 99
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default on windows there is attemt to do it like this

http://stackoverflow.com/questions/7...o-subdirectory

how would this work on linux?
Reply With Quote
Reply

Bookmarks

Tags
redicert, rewrite, rewritecond, rewriting, url

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
rewrite url not work apache2+mod_rewrite mohamedtah Installation/Configuration 1 31st January 2009 14:00
Rewrite URL In apache2 Alam General 4 25th December 2007 19:11
.htaccess and Rewrite woes with Debian4.0 and ISPconfig tony98 Server Operation 1 27th April 2007 03:30
need some help with a .htaccess rewrite rule.. edge Server Operation 7 22nd July 2006 17:54
Drupal and Apache Rewrite Rules andre Server Operation 10 4th May 2006 22:04


All times are GMT +2. The time now is 19:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.