Are you implementing the rewrite rule via a .htaccess file or directly via an Apache configuration file? Could you post the section where you are attempting to use the rule so I can see what might be going wrong.
In the summer of 2011, internationally known brand snow boots Aukoala (Australian Koala) launched an exclusive summer of 2011-2012 models new snow boots UGG boots.relatiegeschenken
Just saying thanks will not just be sufficient, for the phenomenal lucidity in your writing. I will directly grab your rss feed to stay informed of any updates. De lightful work and much success in your business dealings!Computerhulp
Resources like the one you mentioned here will be very useful to me!. and your article is helpful in accelerating my job. thank you very much for everything bruidsfotograaf
Hello, kamal here, just wanted to share my thoughts on your website, you've done a great job with your tips website, hope to come across more interesting ones cheers.phlebotomy classes
This is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works.
The blog article very surprised to me! Your writing is good. In this I learned a lot! Thank you!i like the way you blogged about this topic .Mercy hospital
I was searching and i found here.Informative post. I am a regular visitor of this site.I always appreciate your work. You should keep it up forever. Thanks for this great article. Jogo de futebol
Birds are a miracle because they prove to us there is a finer, simpler state of being which we may strive to attain. sailboats for sale
I really enjoy not getting in a car and running errands on bikes. interesting bikes bikes for sale
Birds are indicators of the environment. If they are in trouble, we know we'll soon be in trouble. great post, birds and parrots relate to this birds for sale
Good article. You read me and I certainly found it a lot many new and useful information about this subject.I are looking for information about it for about 3 hours article helped you. Sell Textbooks
I copied and pasted tha code in .htaccess and I changed the paths
# .htaccess file for Zoop applications
# Applies rewrite rules for canonical domain names and sexier URI query strings.
RewriteEngine on
# Canonical domain name rewrite
# Modify the next two lines to redirect to a canonical domain name.
#RewriteCond %{HTTP_HOST} !^test.surnica.com\.com$ [NC]
#RewriteRule ^(.*)$ http://test.surnica.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Zoop in a
# subdirectory and rewrite rules don't work.
RewriteBase /
# Rewrite URLs to the form 'index.php/x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Visit your site and see if you're redirected to Google instead.
I'm guessing that your server has .htaccess overrides disabled. If this is the case, you'll have to either enable them, or edit the vhost definition in your apache config to add the mod_rewrite handling there.
A less likely, and prob'ly lamer, scenario is that you don't have mod_rewrite on your server. To test for that, remove the lines that say <IfModule mod_rewrite.c> and </IfModule>... If your server spits out a 500 error and starts writing nasty messages in your error log, you're going to have to figure out how to install/enable mod_rewrite.
Hello, this is my first posting here on zoopframework.com.
I also have to make a website with URLs without "index.php" in them. I used Zoop for a framework. The site itself is working perfect, but the .htaccess file shown here to remove the "index.php" is not doing anything. I've tried the
and it redirected me, so .htaccess override is allowed on the server.
Here is what I appended to the .htaccess file already provided in the hosting dir:
RewriteEngine on
# Canonical domain name rewrite
# Modify the next two lines to redirect to a canonical domain name.
RewriteCond %{HTTP_HOST} !^www.freebasearticles\.com(.*)$ [NC]
RewriteRule ^(.*)$ http://www.freebasearticles.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Zoop in a
# subdirectory and rewrite rules don't work.
RewriteBase /
# Rewrite URLs to the form 'index.php/x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
First I would like to say Welcome to the Zoop community.
I accessed the home page for your site and was provided the link list below. Then I change the link to what I think you would expect if the rule was working, but I got 500 Internal error page. Can you look at the error log file for Apache around 11:12 MST on 3/23/09 and post the error? This will help to figure out what is going on.
Note: I always added the Rewrite Code within a directive in my Apache file. So if your files existed in /var/www I would change your .htaccess to look like the example below.
<Directory "/var/www">
<IfModule mod_rewrite.c>
RewriteEngine on
# Modify the RewriteBase if you are using Zoop in a
# subdirectory and rewrite rules don't work.
RewriteBase /
# Rewrite URLs to the form 'index.php/x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>
</Directory>
Tried to put the "Directory "/var/www" ... /Directory" in the .htaccess-file. After that the site became totally unreachable, with "Internal error 500" reply when attempting to load in the browser. I changed the directory from "/var/www", because it was not the one, but even with the correct one it was still having "error 500". The error log provided some information:
"/home/[user]/public_html/.htaccess: Directory not allowed here"
By the time this message showed up the "Directory "/var/www"" was changed to the one in the log.
Commenting out the "Directory..." statement got the site up and running, but still with the "index.php" in the url?
With the .htaccess set back the way you expect it to be please access the URL the way would if the index.php was taken out. You will get a page for a 500 Internal Error at that point please retrieve the error from you Apache log and post it here. Without the error log it is hard to say what might be going on.
[Mon Mar 30 05:22:20 2009] [alert] [client 85.130.26.17] /home/[user]/public_html/.htaccess: Directory not allowed here
The site files are in www, but there is a mirror (not made by me) in public_html.
Edit: When I removed the Directory statement from the .htaccess file, I tiped in an "index.php"-free URL, and I got redirected to the analogue URL with "index.php" in it. No error whatsoever, just a redirect to the old style of URLs
No other rules, the current .htaccess is in top folder, and no redirects. Looks like something from httpd.conf, to which I do not have access to. Other problem is that the hosting is not allowing RewriteLog, so I cannot give you more information than what I had already gave. Strange thing is, that I tried googling for rewrite rules, and everywhere there is the same rule as in the example here. And yet it is not working. Could it be hosting-related?
This could possibly be a hosting limitation it is hard to tell since your host will not let you log more information.
One last thing to check would be if you are using any redirect rules in your PHP code since we have ruled out the Web Server. If you are using the $this->zoneRedirect(), self::zoneRedirect(), or Redirect() it may be part of the problem. Look in your initZone, initPage, and pageDefault functions in your Default Zone. If there is a reference to index.php in any of those functions remove it. If you are using zoneRedirect switch to Redirect since I had an issue with zoneRedirect inferring index.php when it did not need to.
I wrote a ticket to the hosting support, and they said that the .htaccess itself is OK, but there is an issue with the software (the PHP files). In the Default zone there is a Redirect which I put there, (not zoneRedirect), and it had "index.php" in it. I removed it and now the browser says that this redirect will never be completed. I went through the code of Zoop, and I found out that there is "app_url_rewrite" directive in config.php, which is set to "true" from the very beginning. I browsed the code in globals.php, and there also IS code (depending on the "app_url_rewrite" directive), which should rewrite the URLs (not only in matter of adding or removing "index.php"). On top of that, at the end of this file there is a comment, that says:
/******** URL Rewrite example ****************\
*
* This is an example of the mod_rewrite commands
* to put in your httpd.conf file to get rid of
* index.php in the URL line.
*
RewriteEngine on
RewriteLog logs/test-rewritelog
RewriteLogLevel 9
*
* Cool, eh? Change the paths apropriately.
* This assumes that all your normal files are in /resources/ somewhere, including images, css, js, etc
\******** End URL Rewrite example ************/
Should I try the directives shown here, and if yes, a little more info on what is understood here as "resources" will be appreciated.
I played around with the code of globals.php. It seems that even as "app_url_rewrite" is set to TRUE and that is visible to the globals.php, it just makes no difference to it, and it adds "index.php" to the URL. Could this be a bug?
Can you post the code for the Redirect call? When I have the Redirect Apache rule setup and I want to perform a Redirect to a zone using PHP I Redirect to the absolute path without the Domain. Please check the example below.
The Redirect shown in the previous post is no longer there. I replaced it with a default homepage and now it is not redirecting to the "Advertising" category.
I made a mirror of the site on my personal Apache at home. It worked flawlessly. It appears that the issue is on only on Apache2 servers. I've been working on the .htaccess today, so this working link might be an echo of my efforts, but yet not all links work properly when I typed them like that. I need to know what may be the difference between the .htaccess syntax in Apache1.3 and 2, since under 1.3 there is no problem with that at all.
I use Apache2 with the listed code without any issue. Actually I have never used Apache 1.x so I am not sure the difference lies in the Apache versions as much as with the Web Server setup by the ISP. You may have you home setup closer to the default Apache setup which allows the code to function as intended. Please let me know if you find the cause of the issue so it can be logged here for other users.
Been talking to other people as well - they all think that it is a hosting-related problem (setup of the Apache). A friend of mine also looked around the code of Zoop and found nothing to be the reason of that behaviour. The moment I have a working resolution I'll post it here to be used from other people too. This issue with shared hostings could be a seroius drawback for Zoop and should be removed.
In my personal opinion I too think that it is a hosting related problem. Framework is one of my favorite and the first integrated software packages for Pcs including programming languages. Has anyone tried vCloud Director? Because I guess it could be the perfect solution to the problem.
The author has written an excellent article. You made your point and not much to discuss. It's like this universal truth that you can not argue with the truth is not universal, everything has its exception. Thanks for this information.Masterboard
Business, more than any other occupation, is a continual dealing with the future; it is a continual calculation, an instinctive exercise in foresight. horoscope gratuit
UNICEF, as one of the agencies within the UN auspices must have had some agenda related to the development of gifted children in the soccer field. eiken balken
I find it interesting that most of the people who commented with opposite thoughts and opinions, did so in such a judgemental and well thought out, ThanK u your views truly open my mind.gift baskets
Tips And Tricks
The link below will take you to the Tips and Tricks section with the answer.
http://zoopframework.com/forum/tips-and-tricks/htaccess-rewrite-rule-for...
I have already try it
It`s not working
How Are You Implementing?
Are you implementing the rewrite rule via a .htaccess file or directly via an Apache configuration file? Could you post the section where you are attempting to use the rule so I can see what might be going wrong.
Its very helpful, i have
Its very helpful, i have read and bookmark this site and will recommend it to more other peoples. Hawaii Tours
In the summer of 2011,
In the summer of 2011, internationally known brand snow boots Aukoala (Australian Koala) launched an exclusive summer of 2011-2012 models new snow boots UGG boots.relatiegeschenken
Just saying thanks will not
Just saying thanks will not just be sufficient, for the phenomenal lucidity in your writing. I will directly grab your rss feed to stay informed of any updates. De lightful work and much success in your business dealings!Computerhulp
Resources like the one you
Resources like the one you mentioned here will be very useful to me!. and your article is helpful in accelerating my job. thank you very much for everything bruidsfotograaf
Hello, kamal here, just
Hello, kamal here, just wanted to share my thoughts on your website, you've done a great job with your tips website, hope to come across more interesting ones cheers.phlebotomy classes
This is a good post. This
This is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works.
Corner Baths
The blog article very
The blog article very surprised to me! Your writing is good. In this I learned a lot! Thank you!i like the way you blogged about this topic .Mercy hospital
Answer
Are you sure about all those answers ? They could lie to you .
slot machines
Great blog. Looking forward
Great blog. Looking forward to the next one.
nude massage London
I was searching and i found
I was searching and i found here.Informative post. I am a regular visitor of this site.I always appreciate your work. You should keep it up forever. Thanks for this great article. Jogo de futebol
Thanks for provide me nice &
Thanks for provide me nice & great information.
iPhone 5
I am looking for a guide for
I am looking for a guide for SEO and internet marketing.What the best do it yourself seo and Internet marketing book or etc?
There are plenty of
There are plenty of information about this topic in the net & some are definitely better than others.OSB Board
Yes, I am also encountering
Yes, I am also encountering this issue, I can't seems to see how to delete this option, if anyone can share the guide, I highly appreciate it.
genf20
Try to post other issues
Try to post other issues here so it would be easy to identify.
ipad case
nice post
Birds are a miracle because they prove to us there is a finer, simpler state of being which we may strive to attain. sailboats for sale
I really enjoy not getting in a car and running errands on bikes. interesting bikes bikes for sale
Birds are indicators of the environment. If they are in trouble, we know we'll soon be in trouble. great post, birds and parrots relate to this birds for sale
i want some more details of
i want some more details of this framework for my project.
Hindi Movies
Thanks for sharing this.
Thanks for sharing this. it's very useful and informative.
Pacquiao vs Marquez
Cotto vs Margarito
ok will try to remove
ok will try to remove index.php page from this method.
Indian Movies
nice
Good article. You read me and I certainly found it a lot many new and useful information about this subject.I are looking for information about it for about 3 hours article helped you.
Sell Textbooks
I really like it
Keep posting stuff like this i really like it
Scot
Hi
I copied and pasted tha code in .htaccess and I changed the paths
# .htaccess file for Zoop applications
# Applies rewrite rules for canonical domain names and sexier URI query strings.
RewriteEngine on
# Canonical domain name rewrite
# Modify the next two lines to redirect to a canonical domain name.
#RewriteCond %{HTTP_HOST} !^test.surnica.com\.com$ [NC]
#RewriteRule ^(.*)$ http://test.surnica.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Zoop in a
# subdirectory and rewrite rules don't work.
RewriteBase /
# Rewrite URLs to the form 'index.php/x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
As a test
Add the following line to your htaccess file, just after RewriteEngine on:
Visit your site and see if you're redirected to Google instead.
I'm guessing that your server has .htaccess overrides disabled. If this is the case, you'll have to either enable them, or edit the vhost definition in your apache config to add the mod_rewrite handling there.
A less likely, and prob'ly lamer, scenario is that you don't have mod_rewrite on your server. To test for that, remove the lines that say
<IfModule mod_rewrite.c>and</IfModule>... If your server spits out a 500 error and starts writing nasty messages in your error log, you're going to have to figure out how to install/enable mod_rewrite.Same here
Hello, this is my first posting here on zoopframework.com.
I also have to make a website with URLs without "index.php" in them. I used Zoop for a framework. The site itself is working perfect, but the .htaccess file shown here to remove the "index.php" is not doing anything. I've tried the
RewriteRule .* http://google.com/ [L,R=301]
and it redirected me, so .htaccess override is allowed on the server.
Here is what I appended to the .htaccess file already provided in the hosting dir:
RewriteEngine on
# Canonical domain name rewrite
# Modify the next two lines to redirect to a canonical domain name.
RewriteCond %{HTTP_HOST} !^www.freebasearticles\.com(.*)$ [NC]
RewriteRule ^(.*)$ http://www.freebasearticles.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Zoop in a
# subdirectory and rewrite rules don't work.
RewriteBase /
# Rewrite URLs to the form 'index.php/x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
The server is Unix with Apache 2.
So, what am I not doing right?
Hello and Welcome
First I would like to say Welcome to the Zoop community.
I accessed the home page for your site and was provided the link list below. Then I change the link to what I think you would expect if the rule was working, but I got 500 Internal error page. Can you look at the error log file for Apache around 11:12 MST on 3/23/09 and post the error? This will help to figure out what is going on.
Provided: http://www.freebasearticles.com/index.php/browse_category/1/10/advertisi...
Expected: http://www.freebasearticles.com/browse_category/1/10/advertising
Note: I always added the Rewrite Code within a directive in my Apache file. So if your files existed in /var/www I would change your .htaccess to look like the example below.
<Directory "/var/www"> <IfModule mod_rewrite.c> RewriteEngine on # Modify the RewriteBase if you are using Zoop in a # subdirectory and rewrite rules don't work. RewriteBase / # Rewrite URLs to the form 'index.php/x'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] </IfModule> </Directory>Hello again
Thank you for the reply.
Tried to put the "Directory "/var/www" ... /Directory" in the .htaccess-file. After that the site became totally unreachable, with "Internal error 500" reply when attempting to load in the browser. I changed the directory from "/var/www", because it was not the one, but even with the correct one it was still having "error 500". The error log provided some information:
"/home/[user]/public_html/.htaccess: Directory not allowed here"
By the time this message showed up the "Directory "/var/www"" was changed to the one in the log.
Commenting out the "Directory..." statement got the site up and running, but still with the "index.php" in the url?
Any suggestions?
Now Try
With the .htaccess set back the way you expect it to be please access the URL the way would if the index.php was taken out. You will get a page for a 500 Internal Error at that point please retrieve the error from you Apache log and post it here. Without the error log it is hard to say what might be going on.
The error log
That is what the error log is saying:
[Mon Mar 30 05:22:20 2009] [alert] [client 85.130.26.17] /home/[user]/public_html/.htaccess: Directory not allowed here
The site files are in www, but there is a mirror (not made by me) in public_html.
Edit: When I removed the Directory statement from the .htaccess file, I tiped in an "index.php"-free URL, and I got redirected to the analogue URL with "index.php" in it. No error whatsoever, just a redirect to the old style of URLs
Rule Order
When I type in http://www.freebasearticles.com/ I am getting a 302 redirect to http://www.freebasearticles.com/index.php/browse_category/1/10/advertisi.... It looks like there is a redirect rule running before the rewrite rule which might be causing all the issues. Have you setup any other rules in parent folders?
No.
No other rules, the current .htaccess is in top folder, and no redirects. Looks like something from httpd.conf, to which I do not have access to. Other problem is that the hosting is not allowing RewriteLog, so I cannot give you more information than what I had already gave. Strange thing is, that I tried googling for rewrite rules, and everywhere there is the same rule as in the example here. And yet it is not working. Could it be hosting-related?
Hosting Issue
This could possibly be a hosting limitation it is hard to tell since your host will not let you log more information.
One last thing to check would be if you are using any redirect rules in your PHP code since we have ruled out the Web Server. If you are using the $this->zoneRedirect(), self::zoneRedirect(), or Redirect() it may be part of the problem. Look in your initZone, initPage, and pageDefault functions in your Default Zone. If there is a reference to index.php in any of those functions remove it. If you are using zoneRedirect switch to Redirect since I had an issue with zoneRedirect inferring index.php when it did not need to.
More info
I wrote a ticket to the hosting support, and they said that the .htaccess itself is OK, but there is an issue with the software (the PHP files). In the Default zone there is a Redirect which I put there, (not zoneRedirect), and it had "index.php" in it. I removed it and now the browser says that this redirect will never be completed. I went through the code of Zoop, and I found out that there is "app_url_rewrite" directive in config.php, which is set to "true" from the very beginning. I browsed the code in globals.php, and there also IS code (depending on the "app_url_rewrite" directive), which should rewrite the URLs (not only in matter of adding or removing "index.php"). On top of that, at the end of this file there is a comment, that says:
/******** URL Rewrite example ****************\
*
* This is an example of the mod_rewrite commands
* to put in your httpd.conf file to get rid of
* index.php in the URL line.
*
RewriteEngine on
RewriteCond %{THE_REQUEST} !^(.*)/resources(.*)$
RewriteRule ^(/.*)$ /home/dir/path/to/index.php [E=PATH_INFO:$1]
RewriteCond %{THE_REQUEST} ^(.*)/resources/(.*)$
RewriteRule ^/resources/(.*)$ /home/dir/path/to/resources/$1
RewriteLog logs/test-rewritelog
RewriteLogLevel 9
*
* Cool, eh? Change the paths apropriately.
* This assumes that all your normal files are in /resources/ somewhere, including images, css, js, etc
\******** End URL Rewrite example ************/
Should I try the directives shown here, and if yes, a little more info on what is understood here as "resources" will be appreciated.
Made a little testing...
I played around with the code of globals.php. It seems that even as "app_url_rewrite" is set to TRUE and that is visible to the globals.php, it just makes no difference to it, and it adds "index.php" to the URL. Could this be a bug?
What does the Redirect call look like
Can you post the code for the Redirect call? When I have the Redirect Apache rule setup and I want to perform a Redirect to a zone using PHP I Redirect to the absolute path without the Domain. Please check the example below.
Zone: test
Domain: www.test.com
So if I want to redirect to http://www.test.com/test I would do the following in the Zone code:
Redirect('/test');Redirect
Sure, here it is:
Redirect('http://www.freebasearticles.com/index.php/browse_category/1/10/advertising');
If it is like this:
Redirect('http://www.freebasearticles.com/browse_category/1/10/advertising');
it gives me an error page "redirect cannot be completed".
Update
The Redirect shown in the previous post is no longer there. I replaced it with a default homepage and now it is not redirecting to the "Advertising" category.
The Link Works For Me
I just pasted the URL below and it correctly displayed the page without redirecting to index.php. Are you still having an issue?
http://www.freebasearticles.com/browse_category/1/10/advertising
Sort of
I made a mirror of the site on my personal Apache at home. It worked flawlessly. It appears that the issue is on only on Apache2 servers. I've been working on the .htaccess today, so this working link might be an echo of my efforts, but yet not all links work properly when I typed them like that. I need to know what may be the difference between the .htaccess syntax in Apache1.3 and 2, since under 1.3 there is no problem with that at all.
Apache 2
I use Apache2 with the listed code without any issue. Actually I have never used Apache 1.x so I am not sure the difference lies in the Apache versions as much as with the Web Server setup by the ISP. You may have you home setup closer to the default Apache setup which allows the code to function as intended. Please let me know if you find the cause of the issue so it can be logged here for other users.
Sure:)
Been talking to other people as well - they all think that it is a hosting-related problem (setup of the Apache). A friend of mine also looked around the code of Zoop and found nothing to be the reason of that behaviour. The moment I have a working resolution I'll post it here to be used from other people too. This issue with shared hostings could be a seroius drawback for Zoop and should be removed.
In my personal opinion I too
In my personal opinion I too think that it is a hosting related problem. Framework is one of my favorite and the first integrated software packages for Pcs including programming languages. Has anyone tried vCloud Director? Because I guess it could be the perfect solution to the problem.
The author has written an
The author has written an excellent article. You made your point and not much to discuss. It's like this universal truth that you can not argue with the truth is not universal, everything has its exception. Thanks for this information.Masterboard
Kreditkarten im
Kreditkarten im Vergleich.
Eine kostenlose Kreditkarte testen.
Wie Kreditkarten funktionieren.
I'm pretty confident your
I'm pretty confident your syntax is correct. Have you tried it on another computer?
Late Hotels
Business, more than any
Business, more than any other occupation, is a continual dealing with the future; it is a continual calculation, an instinctive exercise in foresight. horoscope gratuit
fotocamera
UNICEF, as one of the agencies within the UN auspices must have had some agenda related to the development of gifted children in the soccer field.
eiken balken
portugese tegels
fotocamera
gift baskets
I find it interesting that most of the people who commented with opposite thoughts and opinions, did so in such a judgemental and well thought out, ThanK u your views truly open my mind.gift baskets