rewrite issue

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 3
Joined: 01 Feb 2013, 19:12

rewrite issue

01 Feb 2013, 19:21

hello i am trying to rewrite the following without success:

i want all blog entries like e.g.

http://www.mydomain.com/blogengine/post/2013/02/01/Bla-Bla.aspx

to become

http://www.mydomain.com/blog/2013/02/01/Bla-Bla

and this: http://www.mydomain.com/blogengine/ should simply become this: http://www.mydomain.com/blog

Thanks for any help:-)

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: rewrite issue

03 Feb 2013, 13:52

Hello,

Please, tru to use the following in your .htaccess file:

Code: Select all
RewriteEngine on

RewriteRule ^blogengine/post/(.*)\.aspx$ /blog/$1 [NC,R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/(.*)$ /blogengine/post/$1.aspx [NC,L]


Regards
Andrew

User avatar
Posts: 3
Joined: 01 Feb 2013, 19:12

Re: rewrite issue

03 Feb 2013, 23:20

Hello Andrew,
thanks,

the second rule works just fine,

unfortunately the first rule:

RewriteRule ^blogengine/post/(.*)\.aspx$ /blog/$1 [NC,R=301,L]

does not show any effect.

this: http://www.mydomain.com/blogengine/ should become this: http://www.mydomain.com/blog
but it just stays at http://www.mydomain.com/blogengine/

Any idea?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: rewrite issue

04 Feb 2013, 00:31

So there's no "post" folder? Does it work with "post" being removed from the rule?

Regards
Andrew

User avatar
Posts: 3
Joined: 01 Feb 2013, 19:12

Re: rewrite issue

04 Feb 2013, 03:46

no, there is no "post" and also no .aspx

simply
http://www.mydomain.com/blogengine/

should become this:

http://www.mydomain.com/blog

any idea?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: rewrite issue

04 Feb 2013, 10:48

These are the rules, however you might need to provide the rewrite.log for the testing request.
Logging issues described in FAQ

Code: Select all
RewriteEngine on

RewriteRule ^blogengine/(.*)$ /blog/$1 [NC,R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/(.*)$ /blogengine/$1 [NC,L]



Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 0 guests