Problem with mod_rewrite

Need help with the Administration of your Joomla! site? Pop your questions in here.

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.
Locked
hwhitney
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Mon Oct 06, 2008 2:33 pm

Problem with mod_rewrite

Post by hwhitney » Mon Dec 08, 2008 2:33 pm

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!

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: Problem with mod_rewrite

Post by dhuelsmann » Mon Dec 08, 2008 2:51 pm

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:

Code: Select all

RewriteEngine On
Options +FollowSymLinks
Redirect /google.html http://www.google.com
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.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

hwhitney
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Mon Oct 06, 2008 2:33 pm

Re: Problem with mod_rewrite

Post by hwhitney » Mon Dec 08, 2008 4:21 pm

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:

Code: Select all

RewriteEngine On
Options +FollowSymLinks
Redirect /google.html http://www.google.com
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.
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?

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: Problem with mod_rewrite

Post by dhuelsmann » Mon Dec 08, 2008 4:51 pm

Go to your host. It is their issue.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

hwhitney
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Mon Oct 06, 2008 2:33 pm

Re: Problem with mod_rewrite

Post by hwhitney » Mon Dec 08, 2008 4:53 pm

dhuelsmann wrote:Go to your host. It is their issue.
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.

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: Problem with mod_rewrite

Post by dhuelsmann » Mon Dec 08, 2008 5:40 pm

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

hwhitney
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Mon Oct 06, 2008 2:33 pm

Re: Problem with mod_rewrite

Post by hwhitney » Mon Dec 08, 2008 5:46 pm

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.

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: Problem with mod_rewrite

Post by dhuelsmann » Mon Dec 08, 2008 5:58 pm

I meant the Go Daddy techs
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

Jerren
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Tue Nov 18, 2008 8:43 pm

Re: Problem with mod_rewrite

Post by Jerren » Sun May 02, 2010 4:33 pm

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!

abom1
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Jul 10, 2010 5:11 pm

Re: Problem with mod_rewrite

Post by abom1 » Sat Jan 22, 2011 11:12 pm

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.

arvendal
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 193
Joined: Wed Mar 28, 2007 1:19 pm
Location: Sweden

Re: Problem with mod_rewrite

Post by arvendal » Tue Jan 17, 2012 3:09 pm

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:

Code: Select all

No input file specified: (/home/f/fsdata/www/slask/index.php)
Getting closer... anyone who knows what's going on?

agalysson
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Sep 17, 2011 1:33 pm

Re: Problem with mod_rewrite

Post by agalysson » Fri Mar 30, 2012 11:51 pm



Locked

Return to “Administration - 1.0.x”