| Author |
|
gsp Newbie

Joined: 11 January 2011
Online Status: Offline Posts: 25
|
| Posted: 25 March 2011 at 2:11am | IP Logged
|
|
|
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
Online Status: Offline Posts: 25
|
| Posted: 25 March 2011 at 3:39am | IP Logged
|
|
|
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
Online Status: Offline Posts: 10520
|
| Posted: 25 March 2011 at 3:45am | IP Logged
|
|
|
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
Online Status: Offline Posts: 25
|
| Posted: 25 March 2011 at 4:13am | IP Logged
|
|
|
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
Online Status: Offline Posts: 10520
|
| Posted: 25 March 2011 at 4:51am | IP Logged
|
|
|
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
Online Status: Offline Posts: 25
|
| Posted: 25 March 2011 at 5:46am | IP Logged
|
|
|
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
Online Status: Offline Posts: 25
|
| Posted: 25 March 2011 at 6:39am | IP Logged
|
|
|
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
Online Status: Offline Posts: 10520
|
| Posted: 25 March 2011 at 8:08am | IP Logged
|
|
|
"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
Online Status: Offline Posts: 25
|
| Posted: 25 March 2011 at 10:20pm | IP Logged
|
|
|
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
Online Status: Offline Posts: 25
|
| Posted: 25 March 2011 at 11:08pm | IP Logged
|
|
|
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
Online Status: Offline Posts: 25
|
| Posted: 26 March 2011 at 12:10am | IP Logged
|
|
|
|
| Back to Top |
|
| |
gsp Newbie

Joined: 11 January 2011
Online Status: Offline Posts: 25
|
| Posted: 28 March 2011 at 1:52am | IP Logged
|
|
|
Please let me know whether I missed anything?
Thanks
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 28 March 2011 at 3:40am | IP Logged
|
|
|
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
Online Status: Offline Posts: 25
|
| Posted: 28 March 2011 at 3:53am | IP Logged
|
|
|
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
Online Status: Offline Posts: 10520
|
| Posted: 28 March 2011 at 7:10am | IP Logged
|
|
|
What's the request you are making?
Please show the requested URL.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
gsp Newbie

Joined: 11 January 2011
Online Status: Offline Posts: 25
|
| Posted: 28 March 2011 at 7:19am | IP Logged
|
|
|
1. http://www.efacility.in/blog 2. 'case studies' from categories section
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 28 March 2011 at 8:05am | IP Logged
|
|
|
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
Online Status: Offline Posts: 25
|
| Posted: 29 March 2011 at 3:33am | IP Logged
|
|
|
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
Online Status: Offline Posts: 10520
|
| Posted: 29 March 2011 at 4:26am | IP Logged
|
|
|
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
Online Status: Offline Posts: 25
|
| Posted: 29 March 2011 at 5:20am | IP Logged
|
|
|
http://www.efacility.in/blog/index.php/category/case-studies/
I will give change CSS to absolute format
Thanks
|
| Back to Top |
|
| |