Converting Apache RewriteRule/Cond to Abyss URL Rewrite

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
timleonard
-


Joined: 30 Aug 2007
Posts: 16
Location: La Mirada, CA. USA

PostPosted: Thu Aug 30, 2007 8:31 pm    Post subject: Converting Apache RewriteRule/Cond to Abyss URL Rewrite Reply with quote

Would someone be so kind as to help me conver the following .htacess rewriterule to abyss url rewrite


RewriteEngine On
RewriteBase /wpmu/


#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]



Thanks in advance for your help

TL
Back to top View user's profile Send private message
timleonard
-


Joined: 30 Aug 2007
Posts: 16
Location: La Mirada, CA. USA

PostPosted: Sat Sep 01, 2007 6:01 pm    Post subject: Reply with quote

OK I have been racking my brain for for days now and still can't this figure out. Could someone PLEASE point me in the right direction. Below is what I have been trying with no success...


^/wpmu(.*/)?files/$ Perform an internal redirection
/wpmu/index.php Continue with the next rule
^/wpmu(.*/)?files/(.*) Perform an internal redirection
/wpmu/wp-content/blogs.php?files=$2 Continue with the next rule
^/wpmu([_0-9a-zA-Z-]+/)?(wp-.*) Perform an internal redirection
$2 Continue with the next rule
^/wpmu([_0-9a-zA-Z-]+/)?(.*\.php)$ Perform an internal redirection
$2 Stop matching


Any help is greatly appreciated

TL
Back to top View user's profile Send private message
timleonard
-


Joined: 30 Aug 2007
Posts: 16
Location: La Mirada, CA. USA

PostPosted: Thu Sep 06, 2007 6:38 pm    Post subject: Reply with quote

Good grief!!!!!

I am still having an issue with this rewrite URL stuff. Is there not anyone who can shed some light on this or point me in a direction I can understand. I have read through every rewrite related posting and still can't figure this out.

can someone Pleassse help

TL
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Sep 06, 2007 8:46 pm    Post subject: Reply with quote

Hello Timleonard,

Have you tried reading the "Converting mod_rewrite directives" tutorial?
http://www.aprelium.com/abyssws/articles/urlrewriting-modrewrite-conversion.html

Aprelium is very busy with the release of Abyss Web Server version 2.5. Please be patient! ;-)
Back to top View user's profile Send private message Visit poster's website
timleonard
-


Joined: 30 Aug 2007
Posts: 16
Location: La Mirada, CA. USA

PostPosted: Fri Sep 14, 2007 6:24 am    Post subject: Reply with quote

Well I finally got it to work...Not sure if it is 100% right but its working

here is what I am using, perhaps someone can make suggestions if its not right

^/wpmu/(.*/)?files/$ Perform an internal redirection
/wpmu/index.php Stop matching

^/wpmu/(.*/)?files/(.*) Perform an internal redirection
/wpmu/wp-content/blogs.php?file=$2 Stop matching

^/wpmu/(wp-.*)$ Perform an internal redirection
/wpmu/$1 Stop matching

REQUEST_FILENAME Is a file
REQUEST_FILENAME Is a directory
^/wpmu/. Perform an internal redirection
/wpmu/- Stop matching

^/wpmu/([_0-9a-zA-Z-]+/)?(wp-.*) Perform an internal redirection
/wpmu/$2 Stop matching

^/wpmu/([_0-9a-zA-Z-]+/)?(.*\.php)$ Perform an internal redirection
/wpmu/$2 Stop matching

^/wpmu/. Perform an internal redirection
/wpmu/index.php Stop matching

TL
Back to top View user's profile Send private message
etorvinen
-


Joined: 02 Jan 2005
Posts: 31

PostPosted: Sat Aug 09, 2008 1:18 am    Post subject: RE: Admin Section Reply with quote

This is the full htaccess file.
Code:
RewriteEngine On
RewriteBase BASE/

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

#add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ /$1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

Where it says #add a trailing slash to /wp-admin i converted the following rule!
Virtual Path Regular Expression: ^.*/wp-admin$
Case Sensitive: Unchecked
Conditions: No Conditions!
Apply to subrequests too: Checked
If this rule matches: Perform Internal Redirection
Redirect to: ^(.+)$/$1/
Append Query String & Escape Redirection Location: Checked
Next Action: Stop


I moved it so it is the 3rd rule according to timleonard's last update. - This will make if a user logs in to his/her blog it will add an slash to the admin directory. This is probably needed!

Hope this post was somewhat helpful.
_________________
;@


Last edited by etorvinen on Sat Aug 09, 2008 3:17 am; edited 1 time in total
Back to top View user's profile Send private message
etorvinen
-


Joined: 02 Jan 2005
Posts: 31

PostPosted: Sat Aug 09, 2008 1:37 am    Post subject: Another Missing Reply with quote

The only thing i am trying to figure out now is when a user registers for an blog then tryies to edit his or her post, it says "You are not allowed to edit this page." and the main sites title is displayed instead of her/his blog title.

The strange part is that it does update the posting but gives this strange error. It looks like it is trying to access the main blog that him/her does not have access too.

This even happens without adding the new rule above, it is an issues/bug I am trying to figure out.

2. RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* - needs to be converted. i will be working on it and checking this post if any one converted it.
Rule needs to be converted...

If anyone can help with the issues, much thanks..
_________________
;@
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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


Powered by phpBB phpBB Group