Problem with mod_rewrite
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 15
- Joined: Mon Oct 06, 2008 2:33 pm
Problem with mod_rewrite
I am trying to implement sh404sef into my joomla site with .htaccess. From looking around forums etc. I believe I have it all set up correctly, renaming the htaccess.txt to .htaccess, commenting out and uncommenting the appropriate lines etc. I still get 404 errors when I set it to "with .htaccess (mod_rewrite)." Checking under system info/php info, mod-rewrite does NOT show up under loaded modules, however, when I contacted godaddy they verified that it IS enabled by default. I have taken over this site from someone else so I did not originally build it, so consequently I do not know what kind of changes may have been made that would have caused that or what changes to make to fix it. I am by no means an expert at this and the best that I could gather from the godaddy help was that maybe the site is running off a different version of apache from a different location than they have access to and mod_rewrite is not loaded there. Does any of this make sense to anyone who could help me out? It would be much appreciated!
- dhuelsmann
- Joomla! Master
- Posts: 19659
- Joined: Sun Oct 02, 2005 12:50 am
- Location: Omaha, NE
- Contact:
Re: Problem with mod_rewrite
The first thing do do is go back to the basics.
1. Turn off all of the third party SEF components.
2. Let's test to see if mod_rewrite is enabled on your server. Place only the following code in .htaccess:
Now point your browser to: http://www.yoursite.com/google.html
If it redirects you to Google - mod_rewrite is working.
If it gives you an error - mod_rewrite is not working.
Note: Replace "www.yoursite.com" with your actual web site domain.
3. If mod rewrite works, then replace the .htaccess you created above with the htaccess.txt file that came with your Joomla installation. Rename it to .htaccess.
4. Now turn on SEF and Dynamic titles on the seo tab in global configuration. Check out your links which will look like http://www.yoursite.com/content/view/12/26. If they work, you can then go to the next step. Report back here.
1. Turn off all of the third party SEF components.
2. Let's test to see if mod_rewrite is enabled on your server. Place only the following code in .htaccess:
Code: Select all
RewriteEngine On
Options +FollowSymLinks
Redirect /google.html http://www.google.com
If it redirects you to Google - mod_rewrite is working.
If it gives you an error - mod_rewrite is not working.
Note: Replace "www.yoursite.com" with your actual web site domain.
3. If mod rewrite works, then replace the .htaccess you created above with the htaccess.txt file that came with your Joomla installation. Rename it to .htaccess.
4. Now turn on SEF and Dynamic titles on the seo tab in global configuration. Check out your links which will look like http://www.yoursite.com/content/view/12/26. If they work, you can then go to the next step. Report back here.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Mon Oct 06, 2008 2:33 pm
Re: Problem with mod_rewrite
It 404's. I tried with Joomla's seo on and off and waited an hour as I've heard that there can sometimes be an issue with godaddy not recognizing .htaccess changes immediately. So it seems that mod_rewrite is indeed the issue. Where would I go from here?dhuelsmann wrote:The first thing do do is go back to the basics.
1. Turn off all of the third party SEF components.
2. Let's test to see if mod_rewrite is enabled on your server. Place only the following code in .htaccess:
Now point your browser to: http://www.yoursite.com/google.htmlCode: Select all
RewriteEngine On Options +FollowSymLinks Redirect /google.html http://www.google.com
If it redirects you to Google - mod_rewrite is working.
If it gives you an error - mod_rewrite is not working.
Note: Replace "www.yoursite.com" with your actual web site domain.
3. If mod rewrite works, then replace the .htaccess you created above with the htaccess.txt file that came with your Joomla installation. Rename it to .htaccess.
4. Now turn on SEF and Dynamic titles on the seo tab in global configuration. Check out your links which will look like http://www.yoursite.com/content/view/12/26. If they work, you can then go to the next step. Report back here.
- dhuelsmann
- Joomla! Master
- Posts: 19659
- Joined: Sun Oct 02, 2005 12:50 am
- Location: Omaha, NE
- Contact:
Re: Problem with mod_rewrite
Go to your host. It is their issue.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Mon Oct 06, 2008 2:33 pm
Re: Problem with mod_rewrite
I tried talking to godaddy who informed me that it is not their issue because on their end mod_rewrite is loaded and I must be using a different version of apache somewhere other than what they have access to.dhuelsmann wrote:Go to your host. It is their issue.
- dhuelsmann
- Joomla! Master
- Posts: 19659
- Joined: Sun Oct 02, 2005 12:50 am
- Location: Omaha, NE
- Contact:
Re: Problem with mod_rewrite
Go Daddy may not be the best host in the world - Invite your techs to run their own tests on what I assume is a shared server that they set-up to see if mod_rewrite works.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
-
- Joomla! Apprentice
- Posts: 15
- Joined: Mon Oct 06, 2008 2:33 pm
Re: Problem with mod_rewrite
Unfortunately I'm about it as far as techs go - we're a small company and the person who built the site no longer works here though I've been trying to get ahold of him. Thanks for your help.
- dhuelsmann
- Joomla! Master
- Posts: 19659
- Joined: Sun Oct 02, 2005 12:50 am
- Location: Omaha, NE
- Contact:
Re: Problem with mod_rewrite
I meant the Go Daddy techs
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
-
- Joomla! Apprentice
- Posts: 37
- Joined: Tue Nov 18, 2008 8:43 pm
Re: Problem with mod_rewrite
Just because they have mod_rewrite installed and loaded dosn't mean you can actually *use* it.
They probaly have a AllowOverride None in the httpd.config somewhere above you which is disabling the local .htaccess file. I had similar problems with the default install of apache on my CentOS 5.4 dev box, the "simple" solution to fix this is ask them to add "AllowOverride all" in your directory section of their server's config. (This essentially enables ALL overrides on your virtual server, you may not want all of them please consult the mod_rewrite docs on the apache web site for more information.)
The other possibility is that they may have renamed the .htaccess file to something different in your environment, this is done via the AccessFileName directive. If they have done so just ask if they can tell you what you should rename your.htaccess file to enable it or have them fix it on your virtual server's directory for you to use the default .htaccess.
Don't give up, mod_rewrite is great when it just works but it's a terribly complex and powerful module, even those of us that deal with it all the time get frustrated by it now and again. There are quite literally whole books dedicated just to that one module.
Good luck!
They probaly have a AllowOverride None in the httpd.config somewhere above you which is disabling the local .htaccess file. I had similar problems with the default install of apache on my CentOS 5.4 dev box, the "simple" solution to fix this is ask them to add "AllowOverride all" in your directory section of their server's config. (This essentially enables ALL overrides on your virtual server, you may not want all of them please consult the mod_rewrite docs on the apache web site for more information.)
The other possibility is that they may have renamed the .htaccess file to something different in your environment, this is done via the AccessFileName directive. If they have done so just ask if they can tell you what you should rename your.htaccess file to enable it or have them fix it on your virtual server's directory for you to use the default .htaccess.
Don't give up, mod_rewrite is great when it just works but it's a terribly complex and powerful module, even those of us that deal with it all the time get frustrated by it now and again. There are quite literally whole books dedicated just to that one module.
Good luck!
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Jul 10, 2010 5:11 pm
Re: Problem with mod_rewrite
I have the identical problem, and godaddy just washed their hands of it saying that they checked my files, and I don't have mod-rewrite enabled. I'm not so stupid that I can't follow some simple instructions, and it IS enabled. their help is pathetic. I had to explain to the tech what an sef url was in the first place.
Still haven't got it to work, and I've been trying everything I can find since yesterday.
Still haven't got it to work, and I've been trying everything I can find since yesterday.
-
- Joomla! Enthusiast
- Posts: 193
- Joined: Wed Mar 28, 2007 1:19 pm
- Location: Sweden
Re: Problem with mod_rewrite
I experience a similar problem: I'm installing a second Joomla 1.5 on a server that has the same Joomla version already running with working SEO settings. So mod_rewrite is definitely working at the host.
This happens:
Case 1
Search Engine Friendly URLs Yes
Use Apache mod_rewrite No
Add suffix to URLs No
leads to web pages with no connection to the style sheets, just unformatted text is displayed.
Case 2
Search Engine Friendly URL Yes
Use Apache mod_rewrite Yes
Add suffix to URLs No
leads to error 404.
I use a identical copy of the .htaccess file that's used in the website that works.
This really confuses me... How do the faulty URL:s occur???
The first installation is in folder: /www/joomla15 (has a domain pointed at it)
The second is in folder: /www/joomla (uses a temporary hosting URL)
The second installation was from scratch - not restoring any backup.
Rgds
Later added same day:
I noticed I did not use the latest Joomla 1.5.25 in install #2, and when I updated the files the result was working links incl styles for case 1 (above) and this error message for case 2:
Getting closer... anyone who knows what's going on?
This happens:
Case 1
Search Engine Friendly URLs Yes
Use Apache mod_rewrite No
Add suffix to URLs No
leads to web pages with no connection to the style sheets, just unformatted text is displayed.
Case 2
Search Engine Friendly URL Yes
Use Apache mod_rewrite Yes
Add suffix to URLs No
leads to error 404.
I use a identical copy of the .htaccess file that's used in the website that works.
This really confuses me... How do the faulty URL:s occur???
The first installation is in folder: /www/joomla15 (has a domain pointed at it)
The second is in folder: /www/joomla (uses a temporary hosting URL)
The second installation was from scratch - not restoring any backup.
Rgds
Later added same day:
I noticed I did not use the latest Joomla 1.5.25 in install #2, and when I updated the files the result was working links incl styles for case 1 (above) and this error message for case 2:
Code: Select all
No input file specified: (/home/f/fsdata/www/slask/index.php)
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Sep 17, 2011 1:33 pm