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: Reg wordpress pretty links ISAPI rewrite
Author
Message |
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 25 March 2011 at 2:11am

Hi

I have installed wordpress at http://www.mysite.in/blog. Through admin panel I have set permalink settings -> custom structure as below
/index.php/%category%/%postname%/

So My url will be as
http://www.mysite.in/blog/index.php/category/case-studies/

I want to remove index.php from the link

I tried this rule
RewriteRule /blog/(?!index\.php)([^/.]+) /blog/index.php/$1 [I,L]

But it is not working. Please advise

Thank You.

Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 25 March 2011 at 3:39am

The physical path of the my blog folder is

root/mysite/blog, So I tried the below

RewriteRule /mysite/blog/(?!index\.php)([^/.]+) /mysite/blog/index.php/$1 [I,L], But not working

This httpd.ini file at root

I want the url as
http://www.mysite.in/blog/category/case-studies/

Please advise

Thanks
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 25 March 2011 at 3:45am

Please try to fix your rule as follows:

RewriteRule /blog/(?!index\.php)(.+) /blog/index.php/$1 [I,L]

__________________
Regards,
Anton
Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 25 March 2011 at 4:13am

Thanks for your reply.

I tried, but it is not working. Please advise.



Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 25 March 2011 at 4:51am

Have you tried my rule with /mysite prepended:

RewriteRule /mysite/blog/(?!index\.php)(.+) /mysite/blog/index.php/$1 [I,L]

If it doesn't work, please try to come up with some rule which will work for you, e.g.

RewriteRule /blog/.* http\://www.google.com/ [I,RP]

Request /blog/ and try to get redirected to Google page.

__________________
Regards,
Anton
Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 25 March 2011 at 5:46am

I tried all the below, but no change.

RewriteRule /mysite/blog/(?!index\.php)(.+) /mysite/blog/index.php/$1 [I,L]

RewriteRule mysite/blog/.* http\://www.google.com/ [I,RP]

RewriteRule /blog/.* http\://www.google.com/ [I,RP]

What will be the error
Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 25 March 2011 at 6:39am

If I try placing this rule
RewriteRule /blog/.* http\://www.google.com/ [I,RP] at the top of my httpd.ini file it is redirecting to google.

If I try
RewriteRule /blog/(?!index\.php)(.+) /blog/index.php/$1 [I,L], my css are gone.

But still no change in url.

Anything I am missing?

Thanks
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 25 March 2011 at 8:08am

"If I try placing this rule RewriteRule /blog/.* http\://www.google.com/ [I,RP] at the top of my httpd.ini file it is redirecting to google."
- could you please show the complete httpd.ini file you are using.

"If I try RewriteRule /blog/(?!index\.php)(.+) /blog/index.php/$1 [I,L], my css are gone."
- but you get no error, right?
Could you please show the URL you are requesting for testing purposes.

__________________
Regards,
Anton
Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 25 March 2011 at 10:20pm

Please find below details

My Complete httpd.ini file

[ISAPI_Rewrite]

RewriteRule /blog/.* http\://www.google.com/ [I,RP]

RewriteCond Host: (?!www\..*)(.+\.in)
RewriteRule (.*) http\://www.$1$2 [RP]

RewriteCond Host: (?!www\..*)(.+\.com)
RewriteRule (.*) http\://www.$1$2 [RP]

RewriteCond Host: (?!www\..*)(.+\.org)
RewriteRule (.*) http\://www.$1$2 [RP]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain1\.maindomain\.com
RewriteCond URL ^/subdomain1/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain1/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain1\.maindomain\.com
RewriteCond METHOD POST
RewriteRule ^/subdomain1/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain1\.maindomain\.com
RewriteRule (.*) /subdomain1/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain2\.com
RewriteCond URL ^/subdomain2/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain2/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain2\.com
RewriteCond METHOD POST
RewriteRule ^/subdomain2/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain2\.com
RewriteRule (.*) /subdomain2/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain3\.com
RewriteCond URL ^/subdomain3/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain3/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain3\.com
RewriteCond METHOD POST
RewriteRule ^/subdomain3/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain3\.com
RewriteRule (.*) /subdomain3/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain5\.org
RewriteCond URL ^/subdomain5/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain5/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain5\.org
RewriteCond METHOD POST
RewriteRule ^/subdomain5/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain5\.org
RewriteRule (.*) /subdomain5/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain4\.com
RewriteCond URL ^/subdomain4/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain4/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain4\.com
RewriteCond METHOD POST
RewriteRule ^/subdomain4/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain4\.com
RewriteRule (.*) /subdomain4/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain1\.in
RewriteCond URL ^/subdomain1/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain1/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain1\.in
RewriteCond METHOD POST
RewriteRule ^/subdomain1/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain1\.in
RewriteRule (.*) /subdomain1/$1 [I,L]

Url
http://www.efacility.in/blog/


Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 25 March 2011 at 11:08pm

This blog is at subdomain1/blog

[ISAPI_Rewrite]

RewriteRule /blog/.* http\://www.google.com/ [I,RP]

RewriteCond Host: (?!www\..*)(.+\.in)
RewriteRule (.*) http\://www.$1$2 [RP]

RewriteCond Host: (?!www\..*)(.+\.com)
RewriteRule (.*) http\://www.$1$2 [RP]

RewriteCond Host: (?!www\..*)(.+\.org)
RewriteRule (.*) http\://www.$1$2 [RP]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain1\.maindomain\.com
RewriteCond URL ^/subdomain1/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain1/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain1\.maindomain\.com
RewriteCond METHOD POST
RewriteRule ^/subdomain1/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain1\.maindomain\.com
RewriteRule (.*) /subdomain1/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain2\.com
RewriteCond URL ^/subdomain2/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain2/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain2\.com
RewriteCond METHOD POST
RewriteRule ^/subdomain2/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain2\.com
RewriteRule (.*) /subdomain2/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain3\.com
RewriteCond URL ^/subdomain3/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain3/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain3\.com
RewriteCond METHOD POST
RewriteRule ^/subdomain3/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain3\.com
RewriteRule (.*) /subdomain3/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain5\.org
RewriteCond URL ^/subdomain5/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain5/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain5\.org
RewriteCond METHOD POST
RewriteRule ^/subdomain5/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain5\.org
RewriteRule (.*) /subdomain5/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?subdomain4\.com
RewriteCond URL ^/subdomain4/(.*)
RewriteCond METHOD GET
RewriteRule ^/subdomain4/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?subdomain4\.com
RewriteCond METHOD POST
RewriteRule ^/subdomain4/(.*) /$1
RewriteCond Host: (?:.+\.)?subdomain4\.com
RewriteRule (.*) /subdomain4/$1 [I,L]

### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?efacility\.in
RewriteCond URL ^/efacility/(.*)
RewriteCond METHOD GET
RewriteRule ^/efacility/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?efacility\.in
RewriteCond METHOD POST
RewriteRule ^/efacility/(.*) /$1
RewriteCond Host: (?:.+\.)?efacility\.in
RewriteRule (.*) /efacility/$1 [I,L]
Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 26 March 2011 at 12:10am


Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 28 March 2011 at 1:52am

Please let me know whether I missed anything?

Thanks
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 28 March 2011 at 3:40am

Thanks for showing the config.
Could you please tell what result you get upon request to /blog/smth with the following rule at the bottom of your config:

RewriteRule /efacility/blog/(?!index\.php)(.+) /efacility/blog/index.php/$1 [I,L]

__________________
Regards,
Anton
Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 28 March 2011 at 3:53am

Thanks for your reply

I have placed this rule at the bottom of my .httpd.ini file (it is at root). But still index.php is coming in the url

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 28 March 2011 at 7:10am

What's the request you are making?
Please show the requested URL.

__________________
Regards,
Anton
Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 28 March 2011 at 7:19am

1. http://www.efacility.in/blog
2. 'case studies' from categories section

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 28 March 2011 at 8:05am

Ok, now I see what's the problem.
You haven't changed links to be without index.php.
Then please try the following pair of rules:

RewriteRule /efacility/blog/index.php/(.*) /efacility/blog/$1 [I,R]
RewriteRule /efacility/blog/(?!index\.php)(.+) /efacility/blog/index.php/$1 [I,L]

Try it with and without /efacility/ in case of issues.

__________________
Regards,
Anton
Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 29 March 2011 at 3:33am

Thanks for the reply

If I place the above rules without efacility the url displays without index.php. But it displays No input file specified. Also my css are not working.

Any Advise Please

If I try placing the rules at the bottom no change
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 29 March 2011 at 4:26am

If possible please give a link or make a screenshot with the error.

CSS is corrupted due to relative links to .css files.
Please consider changing them to root-relative or absolute format.

__________________
Regards,
Anton
Back to Top
 
gsp
Newbie


Joined: 11 January 2011
Posts: 25
Posted: 29 March 2011 at 5:20am

http://www.efacility.in/blog/index.php/category/case-studies/

I will give change CSS to absolute format

Thanks
Back to Top
 

Page of 2 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