View previous topic :: View next topic |
Author |
Message |
natvetorg -
Joined: 06 Sep 2005 Posts: 11 Location: Victoria TX
|
Posted: Sun Feb 17, 2008 8:18 pm Post subject: I am so Confused - URL rewrite help |
|
|
Could some please rewrite this htacess file for me. I am brain dead and it all looks greek to me.
########### AMEMBER START #####################
AuthType Basic
AuthName "Members Only"
AuthUserFile /Abyss Web Server/htdocs/amember/data/.htpasswd
AuthGroupFile /Abyss Web Server/htdocs/amember/data/.htgroup
Require valid-user
########### AMEMBER FINISH ####################
Thanks
Nia
Do you need the htpasswd and htgroup files too?
Last edited by natvetorg on Mon Feb 18, 2008 8:16 pm; edited 1 time in total |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sun Feb 17, 2008 8:53 pm Post subject: |
|
|
That's not a ModRewrite htaccess file, it's for User Authentication. Just set up a user account and set a Access Control rule. |
|
Back to top |
|
|
natvetorg -
Joined: 06 Sep 2005 Posts: 11 Location: Victoria TX
|
Posted: Sun Feb 17, 2008 9:02 pm Post subject: |
|
|
I'm trying to use amember as it will automatically bill my members their dues.
I'm sorry if this is off topic
Maybe this is what I need translated
<Limit GET POST>
allow from all
</Limit>
RewriteEngine On
RewriteRule 1\.php 2.php |
|
Back to top |
|
|
natvetorg -
Joined: 06 Sep 2005 Posts: 11 Location: Victoria TX
|
Posted: Mon Feb 18, 2008 5:43 pm Post subject: Oh I finally found what I need to have translated. |
|
|
AuthType Basic
AuthName "Members Only"
AuthUserFile {$config[root_dir]}/data/.htpasswd
AuthGroupFile {$config[root_dir]}/data/.htgroup
Require $require
## allow access for any active subscription
RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+)
RewriteCond $config[root_dir]/data/new_rewrite/%1 -f
RewriteRule ^(.*)\$ - [L]
";
$products = 'any';
} else {
foreach ($vars['product_id'] as $pid){
$line .= "
## allow access for product #$pid
RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+)
RewriteCond $config[root_dir]/data/new_rewrite/%1-$pid -f
RewriteRule ^(.*)\$ - [L]
";
}
$products = join(',', $vars['product_id']);
}
$files['.htaccess'] = <<<CUT
-----------------------------------------------------------------------------
########### AMEMBER START #####################
Options +FollowSymLinks
RewriteEngine On
$line
## if user is not authorized, redirect to login page
# BrowserMatch "MSIE" force-no-vary
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(.*)$ $config[root_url]/plugins/protect/new_rewrite/login.php?v=-$products&url=%{REQUEST_URI}?%{QUERY_STRING} [L,R]
RewriteRule ^(.*)$ $config[root_url]/plugins/protect/new_rewrite/login.php?v=-$products&url=%{REQUEST_URI} [L,R]
########### AMEMBER FINISH ####################
------------------------------------------------------
########### AMEMBER START #####################
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)$ {$ru[path]}/plugins/protect/php_include/rewrite.php $line
-----------------------------------------------------
If you need the whole file, please let me know. I'm desperate here.
Also, the directory it all points to is amembers
Thanks everyone
Nia |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Feb 25, 2008 5:54 pm Post subject: Re: Oh I finally found what I need to have translated. |
|
|
natvetorg,
We have replied by email but the message was returned back to us because your mail server was having a problem.
We can help you convert the .htaccess file generated by your script. But the script alone is difficult to follow since we don't know what it will generate (what it will generate depends on the script setup and other information we don't have).
So please run the script to have it generate the .htaccess file and then send us that file. Give us also the full path of the .htaccess file in your hard drive. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
|