473,414 Members | 1,911 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,414 software developers and data experts.

includes and modrewrite

Newbie here.
Site is on shared server Apache, PHP 4.x
I am using modrewrite currently for some other things but I was
wondering about includes in php files. They don't seem to pass through
..htaccess and modrewrite. Is that correct? I have 3 days experience
with .htaccess and modrewrite so I could well be doing something wrong.

What I was trying to do is use a "fake" directory in all my includes
that modrewrite would rewrite to the correct directory.

Thanks,
Mark B.
Oct 10 '06 #1
1 1346
mark Bannister wrote:
Newbie here.
Site is on shared server Apache, PHP 4.x
I am using modrewrite currently for some other things but I was
wondering about includes in php files. They don't seem to pass through
.htaccess and modrewrite. Is that correct? I have 3 days experience
with .htaccess and modrewrite so I could well be doing something wrong.

What I was trying to do is use a "fake" directory in all my includes
that modrewrite would rewrite to the correct directory.

Thanks,
Mark B.
I'm not an expert of this area, but as far as I know PHP's 'include'
doesn't go outside PHP to the webserver at all, so it will not invoke
any server features.
The exception is if you use a full URL in the include, but that gives
other problems - if you want to include a PHP file in that way you have
to arrange that the server will serve PHP source (which it doesn't
usually do).

See http://uk.php.net/manual/en/function.include.php

Colin
Oct 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Tim Tyler | last post by:
A fairly simple question: I have a library A which depends on library B and C. Currently I have: <?php include("A.inc.php"); include("B.inc.php"); include("C.inc.php");
2
by: Joe Mowry | last post by:
First off, I'm posting this question for a friend that doesn't have access to the news groups. Problem: Using PHP as the base and has several PHP < includes > for various functions, all this...
4
by: Patrick | last post by:
I have an ASP site with about 50 ASP files, all of which are currently including a common "includes.asp" file near the top of the file, responsible for generating the <HEAD/> section of the HTML ...
12
by: tshad | last post by:
I am not sure why I am getting this error: I have the following code I want to run from another include file that holds all my functions. functions.inc...
8
by: Alexander Widera | last post by:
hi, perhaps you all know ModRewrite for the apache webserver... Is there an equivalent for asp.net / iis? I don't want to buy a component (.dll)... I want to program it myself. Some time ago, I...
6
by: William F. Zachmann | last post by:
We've got a project going that involves moving an old web site with a massive dll written in C++ that produces most of the output from a SQL 7.0 data base on NT4 onto IIS on Windows 2003 Server...
3
by: Jeff | last post by:
I have an asp page. Now I know this is sortof OT, but I am not sure of the forum to get an answer. I have an include on this asp page <!-- #include file=\forum\includes\consts-inc.asp --> ...
4
by: Ron | last post by:
Hi all, Trying to work out a few problems in using php on my site. Partially this is a html question. I was reading a lot of the posts and it seems that some of the includes people are using are...
0
dlite922
by: dlite922 | last post by:
I need help with redirecting virtualhosts to use HTTPS (SSL) when they type in HTTP Must work in IE. Right now there is two virtual host blocks for every subdomain. I want to combine the...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.