This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Wordpress Permalinks for ISAPI Rewrite 2
Author
Message |
phdimov
Newbie


Joined: 16 May 2010
Location: United States
Posts: 4
Posted: 16 May 2010 at 12:05am

Hello,

I am changing a current aspx website to wordpress. the server has isapi 2. All is working well besides the search engine friendly URLs

Can someone provide instructions what needs to be done to remove index.php and have the permalink structure to

www.example.com/%postname%

thank you


__________________
Peter
Back to Top Visit phdimov's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 17 May 2010 at 3:25am

The config for v2 will be like:

[ISAPI_Rewrite]
RewriteRule /(?!(?:admin|images|css|js|other|physical|folders|and|files|in|the|root))([^/]+)/? /index.php\?p=$1 [I,L]

Please pay attention to the section where certain folders are exluded. You should enlist all existing physical folders/files there to avoid
malfunctioning.
(Note, in ISAPI_Rewrite 3 this is done in much easier way...)

__________________
Regards,
Anton
Back to Top
 
phdimov
Newbie


Joined: 16 May 2010
Location: United States
Posts: 4
Posted: 17 May 2010 at 11:00am

Thanks,

I copied this in my httpd.ini file and nothing happened

http://www.gojump.com/wordpress/?page_id=14

should translate to

http://www.gojump.com/wordpress/safety/

I was also trying to find the code for doing a simple 301 redirect from

 

/safety.aspx to http://www.gojump.com/wordpress/safety/

so there are no broken links when new site is launched.

Thank you for your time and help

Peter



__________________
Peter
Back to Top Visit phdimov's Homepage
 
phdimov
Newbie


Joined: 16 May 2010
Location: United States
Posts: 4
Posted: 17 May 2010 at 11:13am

Note: I keep the site in /wordpress folder until I get it to work I have httpd.ini both in / and /wordpress

__________________
Peter
Back to Top Visit phdimov's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 18 May 2010 at 2:58am

While you are testing the config in /wordpress folder, please try to have the following httpd.ini in the root:

[ISAPI_Rewrite]
RewriteRule /wordpress/(?!(?:admin|images|css|js|other|physical|folders|and|files|in|the|root))([^/]+)/? /wordpress/index.php\?p=$1 [I,L]

#redirect rule
RewriteRule /safety\.aspx http\://www.gojump.com/wordpress/safety/ [I,RP]

__________________
Regards,
Anton
Back to Top
 
phdimov
Newbie


Joined: 16 May 2010
Location: United States
Posts: 4
Posted: 18 May 2010 at 8:30am

This worked this time. amazing

so to make it in root just move files and delete wordpresss, correct?

one interesting thing that differs from apache is that does no automatically rewrite the urls you have to tell it to go to /safety/. On the apache server when it hits

http://www.gojump.com/wordpress/?page_id=14

it rewrites to http://www.gojump.com/wordpress/safety

is there a fix for that.

once we make this I will make a post and have it up for anybody else that has the same issue in the future. The hosting provider is hesitant to move us on a isapi v3 server.

P



__________________
Peter
Back to Top Visit phdimov's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 19 May 2010 at 2:12am

"so to make it in root just move files and delete wordpresss, correct?" - exactly.

"On the apache server when it hits http://www.gojump.com/wordpress/?page_id=14 it rewrites to http://www.gojump.com/wordpress/safety" - I guess
there might be a rule for that. What does "automatically" mean? Can you show the apache config that does that.

"The hosting provider is hesitant to move us on a isapi v3 server." - no reason to hesitate. v3 is definitely having some useful features v2
lacks.

__________________
Regards,
Anton
Back to Top
 
RadarOne
Newbie


Joined: 22 May 2010
Posts: 2
Posted: 23 May 2010 at 3:40pm

Anton wrote:
The config for v2 will be like:

[ISAPI_Rewrite]
RewriteRule /(?!(?:admin|images|css|js|other|physical|folders|and|files|in|the|root))([^/]+)/? /index.php\?p=$1 [I,L]

Please pay attention to the section where certain folders are exluded. You should enlist all existing physical folders/files there to avoid
malfunctioning.
(Note, in ISAPI_Rewrite 3 this is done in much easier way...)


My Provider also still uses ISAPI 2.x and I have problems getting it to work. With the settings above wp-admin isn't accessable and subfolders lik domein/folder/subfolder/ also do not work. Can you help me with this? Please
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 25 May 2010 at 3:03am

@RadarOne:

Please try to fix your rules as follows:

[ISAPI_Rewrite]
RewriteRule /(?!(?:admin|wp-admin|images|css|js|other|physical|folders|subfolders|and|files))(.*) /index.php\?p=$1 [I,L]

__________________
Regards,
Anton
Back to Top
 
RadarOne
Newbie


Joined: 22 May 2010
Posts: 2
Posted: 30 May 2010 at 10:12am

@Anton: with these new rules I only see plain text and no styling and pictures. 
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 31 May 2010 at 2:29am

"with these new rules I only see plain text and no styling and pictures"

- please make sure you've excluded all physical files and folders (e.g. style.css etc.) in the above rule, 'cause the list i put there is just
an example which needs to be fixed if needed.

__________________
Regards,
Anton
Back to Top
 
syoung68
Newbie


Joined: 26 July 2010
Posts: 11
Posted: 26 July 2010 at 10:39am

@Anton: the rule works great on my Wordpress pages and category page(domain.com/contact and domain.com/news) but not on my category posts (domain.com/news/hello-world)

Any thoughts?


Back to Top
 
syoung68
Newbie


Joined: 26 July 2010
Posts: 11
Posted: 26 July 2010 at 11:00am

I actually see the fix... (.*) instead of ([^/]+)/?

However, Radarone is right, all styling is gone, because it is set by the theme. Even if I add "wp-content" and the theme folder, the style does not show up.


Back to Top
 
syoung68
Newbie


Joined: 26 July 2010
Posts: 11
Posted: 26 July 2010 at 11:19am

I think I have it....

RewriteRule /wp-(.*) /wp-$1 [L]
RewriteRule /(?!(?:img|images))(.*) /index.php\?p=$1 [I,L]
Back to Top
 
svetlana
Newbie


Joined: 15 September 2010
Location: Italy
Posts: 13
Posted: 15 September 2010 at 5:04am

Dear Sirs.
i have the same problem, i have IIS 6 and ISAPI Rewrite 2, I need to have Wordpress Permalinks with ondex.php in the url.
The home page of wordpress work fine but not the articles, they give me error 404.
Look at the example:
http://www.etineris.net/it/blog/
http://www.etineris.net/it/blog/ciao-mondo.html

Please help me to solve this problem.
Thank you so much


Back to Top Visit svetlana's Homepage
 
svetlana
Newbie


Joined: 15 September 2010
Location: Italy
Posts: 13
Posted: 15 September 2010 at 5:06am

Sorry i made a mistake:  I need to have Wordpress Permalinks with index.php
Back to Top Visit svetlana's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 15 September 2010 at 8:00am

@svetlana:

Please show the complete config you are using.
And please explain in what way and what exact requests you want to handle.

__________________
Regards,
Anton
Back to Top
 
svetlana
Newbie


Joined: 15 September 2010
Location: Italy
Posts: 13
Posted: 15 September 2010 at 8:37am

Hi Anton,
the configuration is IIS 6 Microsoft Windows 2003 STD 32 bit SP2 w/R2 STD-SRV-SP2-32, ISAPI_Rewrite 2.
In Wordpress configuration i selected Custom Structure and i put /index.php/%postname%.html and all work fine
http://www.etineris.net/it/blog/index.php/ciao-mondo.html

but i need to have the url like http://www.etineris.net/it/blog/ciao-mondo.html without index.php

Worldpress is in it/blog/ folder
Thank you




__________________
svetlana
Back to Top Visit svetlana's Homepage
 
svetlana
Newbie


Joined: 15 September 2010
Location: Italy
Posts: 13
Posted: 16 September 2010 at 1:53am

Hi Anton,
have you news about this issue?
Thank you

Back to Top Visit svetlana's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 16 September 2010 at 2:03am

Ok, I see now.
Please try to have the following rules to make it working:

RewriteRule /it/blog/([^/.]+\.html) /it/blog/index.php/$1 [I,L]

__________________
Regards,
Anton
Back to Top
 

Page of 3 Next >>
 
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum