|
Author |
Message |
Darren
Team Member


Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Fri Nov 14, 2003 4:29 pm (21 years, 4 months ago) |
  |
I'm trying to replace this:
/directory1/directory2/index.php?chapter=introduction
with
/directory1/directory2/introduction or /directory1/directory2/introduction/
so far I have this, but its throwing out an internal server error
Code: | Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/directory1/directory2/([a-z]*)
RewriteRule ^(.*) /directory1/directory2/index.php?chapter=%1 [L] |
I don't get it because this does an identical thing but with numbers and works fine. They are in different directories so are not clashing with each other in some way.
Code: | Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/directorya/directoryb/([0-9]*)/([0-9]*)
RewriteRule ^(.*) /directorya/directoryb/review.php?c=%1&p=%2 [L] |
what am I missing? |
|
|
     |
 |
adam
Forum Moderator & Developer

Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Fri Nov 14, 2003 4:53 pm (21 years, 4 months ago) |
  |
shouldn't it be chapter=$1 not %1?
other than that I'm not sure |
________________________________ It's turtles all the way down... |
|
     |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Nov 14, 2003 5:13 pm (21 years, 4 months ago) |
  |
Also do you have any way of looking at the server logs? |
________________________________
 |
|
    |
 |
Darren
Team Member


Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Fri Nov 14, 2003 5:14 pm (21 years, 4 months ago) |
  |
Now I just get a 404
If I stick .html on the end then that works perfectly, but I'd rather have it the other way. |
|
|
     |
 |
Darren
Team Member


Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Fri Nov 14, 2003 5:17 pm (21 years, 4 months ago) |
  |
Theres fair number of these from my IP
Request exceeded the limit of 20 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. |
|
|
     |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Nov 14, 2003 5:26 pm (21 years, 4 months ago) |
  |
Oh here's the problem: you're catching everything, including directory2/index.php, and redirecting it to directory2/index.php. So you're going round in circles. (At least that's what I'm guessing )
I think you'll have to put index.php somewhere else... |
________________________________
 |
|
    |
 |
Darren
Team Member


Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Fri Nov 14, 2003 6:24 pm (21 years, 4 months ago) |
  |
Just to let everyone know how this was eventually resolved (with Daniel's help ), I decided to abandon the directory and am using the following:
http://www.mydomain.com/directory1/directory2/introduction.chapter
Code: | Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/directory1/directory2/([a-z]*).chapter
RewriteRule ^(.*) /directory1/directory2/index.php?chapter=%1 [L] |
Although it will work, with something like this (but I wasn't keen on that )
http://www.mydomain.com/directory1/directory2/c_introduction/
Code: | Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/directory1/directory2/c_([a-z]*)
RewriteRule ^(.*) /directory1/directory2/index.php?chapter=%1 [L] |
|
|
|
     |
 |
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.142031 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |