473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to set RewriteBase to parent directory?

I have a .htaccess file in the directory called "test" in my "public_html"

I want to set an option for htaccess file that when i browse "test" directory, it include the "index.php" file that exists in "public_html" directory.

I think it may be like this but it didnt work.
Expand|Select|Wrap|Line Numbers
  1. <IfModule mod_rewrite.c>
  2.     RewriteEngine On
  3.     RewriteBase ../
  4.     RewriteRule ^(.*)$ index.php?q=admin/$1 [L,QSA]
  5. </IfModule>
  6.  
Feb 11 '10 #1
1 3984
Any idea about this?
Feb 14 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Golawala, Moiz M (GE Infrastructure) | last post by:
Hi all, What I am trying to do is write some generic code where I can get the path of the parent directory. for example if current working directory is 'Z:\\dirA\\Parent\\Child' I want to get...
2
by: Marvin | last post by:
Hi I get this message. The Include file '../main.asp' cannot contain '..' to indicate the parent directory. I think it is refering to the fact that I have a file called communication.asp,...
3
by: BobAchgill | last post by:
Is this the right way to get to back up to the immediate parent subdirectory? Directory.GetParent("\") or this? Directory.GetParent("..") Or this?
4
by: Paulers | last post by:
hello. how do I get the file's parent directory name out of a path like this? c:\test\myDirectory\file.txt Im looking to extract the "Directory" from the path so I can create myDirectory in...
4
by: FFMG | last post by:
Hi, if I have a site htt://www.example.tdl/folder1/folder2/page.html I want to get the folders from the root, so the folder would be $f = './folder1/folder2/' and the page $p = 'page.html'
4
by: davin.pearson | last post by:
Here is my file index.php: <?php include "../parent.php"; ?> When I try to run this code on a Linux server, it gives me the following error message: Warning: main(): open_basedir...
2
by: supra91 | last post by:
Hi, I have to read files from the parent directory and delete those files. This parent directory contains logs files. This directory also contains some sub directories and I do not want to delete...
3
by: =?Utf-8?B?UGF1bCBIYXRjaGVy?= | last post by:
I have a setup with two web applications, call them parent and child where child is web application held virtual underneath parent though not physically. What I'd like to be able to do is write...
3
by: waqasahmed996 | last post by:
Hi everyone I need a little help with a .htaccess file and RewriteBase. The app I'm trying to run is a php CodeIgnitor app, and the .htaccess looks like it has been coded so that the app will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.