#1  
Old 10th March 2007, 04:41
KenKnight KenKnight is offline
Senior Member
 
Join Date: Nov 2005
Posts: 137
Thanks: 0
Thanked 3 Times in 2 Posts
Default Apache2 mod_rewrite

Hi all,

I'm assisting a client with creating an affiliate website and was investigating mod_rewrite as the solution.

The idea is that a person on the net could hit a url like the following;

http://www.companysite.com/member/membername

This would go to the same subdirectory and page for every member where the page that displays would lookup info about the member based on the requested URL.

I tried using the aliasmatch in much the same way that the vhosts_ispconfig.conf file does, however, if I put in something like;

AliasMatch ^/member/([^/]+)(/(.*))? /var/www/web11/web/test

and goto the following;

http://www.companysite.com/member/MyName

it gets sent to the following;
Code:
http://www.companysite.com/member/MyName/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/
what might be causing this and is there a better way to handle something like this?

Thanks
Ken
Reply With Quote
Sponsored Links
  #2  
Old 10th March 2007, 22:52
KenKnight KenKnight is offline
Senior Member
 
Join Date: Nov 2005
Posts: 137
Thanks: 0
Thanked 3 Times in 2 Posts
 
Default Got it working!

Hi all,

Just posting back to say I got it working.

I ended up using the following in an .htaccess file in the root directory;

Code:
RewriteEngine On

RewriteRule ^members/(.*) index.php?var1=$1
Simple enough.

Cheers!
ken
Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSI with Apache2 on Debian jchaven Server Operation 7 25th August 2008 17:06
Apache2 without APXS ctroyp Installation/Configuration 8 29th January 2007 03:05
Web server offline after php4 and apache2 upgrade dfriis Installation/Configuration 11 7th December 2006 16:14
PHP on Apache2 no longer works after ISPconfig azorman Installation/Configuration 6 23rd July 2006 22:06
apache2 "problem" LuisC-SM Installation/Configuration 6 2nd May 2006 15:59


All times are GMT +2. The time now is 04:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.