.htacess problem - directories changed into site-names
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > .htacess problem - directories changed into site-names




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    .htacess problem - directories changed into site-names  
Frank Ehrlacher


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-13-07 06:23 PM

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!






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:32 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register