473,480 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

.htaccess, url, mod rewrire problem

59 New Member
hello i seem to be having some problem. Consider the following.

Expand|Select|Wrap|Line Numbers
  1. <Files index>
  2. ForceType application/x-httpd-php
  3. </Files>
  4. RewriteEngine On
  5.  
  6. RewriteRule ^([^/\.]+)/?$ index.php?ref=$1 [L]
  7. RewriteRule ^([^/\.]+)/([^/\.]+)?$ index.php?ref=$1&folder=$2[L]
  8. RewriteRule ^([^/\.]+)/page/([^/\.]+)?$ index.php?ref=$1&page=$2[L]
  9.  
here when going to url: www.domainname.com/robert it should go to www.domainname.com/index.php?ref=robert, it works, but it should also go to that url even if www.domainname.com/robert/.

and the following isn't going to the specified urls.

www.domainname.com/robert/archive or www.domainname.com/robert/archive/ to www.domainname.com/index.php?ref=robert&folder=archive

www.domainname.com/robert/page/2 or www.domainname.com/robert/page/2/ to www.domainname.com/index.php?ref=robert&page=2

I hope my explanation was enough, am i doing something wrong?

thanks :)
Aug 5 '07 #1
0 1938

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

Similar topics

1
7682
by: yawnmoth | last post by:
i'm trying to write a php script that will password protect some random directory by creating a .htaccess file, and a password file to accompany the .htaccess file, and it isn't working... ...
7
7476
by: John | last post by:
Hello. I want to get this blasted .htaccess file sorted out, so I can have sessions without register_globals being on. I have looked everywhere for info on this and I mean everywhere...
13
2520
by: Bob Bedford | last post by:
I've protected a directory with an .htaccess file. I'd like some of the files in this directory to be accessible by a scheduler that runs an "URL". The problem is that the scheduler runs scripts...
3
1741
by: Adam King | last post by:
Hey, I've done the standard old trick of adding the error page line into ..htaccess which works absolutely fine if I accidently go to any file other than .php But if I go to "doesntexist.php" I...
15
5115
by: Taki Jeden | last post by:
Hello everybody Does anybody know why w3c validator can not get pages that use 404 htaccess redirection? I set up two web sites so that clients request non-existent urls, but htaccess redirects...
0
1676
by: Jörg Braun | last post by:
Hello NG, i have a problem With WebRequest! i want to download a htaccess saved file over a proxyconnetion with authentication. Download a file what is not saved with htaccess is no problem,...
1
1621
by: John MacLeod | last post by:
I'm having a problem using the .htaccess file to point my local installation of php5 (located at www.mydomain.com/horde/cgi-bin/php5.cgi). As per the instructions I was following I added the...
0
11274
by: asherwolf | last post by:
Hi, I'm trying to do something I think is pretty neat, but I've just about pulled my hair out by the behavior of my server. I'm hosting on GoDaddy, using a subdomain (www.mywebpage.com maps to...
0
2120
by: deco12 | last post by:
Hi, I am new to web design and Apache, but have managed to password protect my site by putting a .htaccess file in the sites root directory. I have set it up so that a number of members have...
0
7046
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
7048
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
7088
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
6956
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...
1
4783
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...
0
4485
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2997
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
183
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.