.htacess problem - directories changed into site-names

This is a discussion on .htacess problem - directories changed into site-names within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, and sorry for my english first. I'm using .htacess to rewrite dynamic php-sites into static ones (htm) ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-13-2007
Frank Ehrlacher
 
Posts: n/a
Default .htacess problem - directories changed into site-names

Hi,

and sorry for my english first.

I'm using .htacess to rewrite dynamic php-sites into static ones (htm)
Example:
dir1/sideXY.htm ist redirected to site.php?id=XY
using (.htacess in dir1):
RewriteEngine on
Options FollowSymLinks
RewriteRule ^site(.*)\.htm$ /dir1/site.php?id=$1 [L]
This works perfectly.

Now I wanna have rewriten "virtual" directories ...
Example:
dir1/dirXY/ should be rewritten into /dir1/site.php?id=$1 [L]
At the same time "old" requests to dir1/sideXY.htm should be rewritten to
the new dir1/dirXY (via 301) too.

What I tried is (changed .htacess in dir1):
Options FollowSymLinks
RewriteRule ^side(.*)\.htm$ /dir1/$1/ [R=301]
RewriteRule ^dir1/(.*)/$ /dir1/site.php?id=$1 [L]

The first line works, /dir1/sideXY/ appears in browser's URL-field.
But then it gets a "404" "Side missing" - so the 2nd line doesn't seem to
work?

Is there one thing I didn't see?

Thanks for Your help!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:18 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0