URL rewriting causes 404 error
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: 6
- Joined: Wed Aug 01, 2012 6:18 pm
URL rewriting causes 404 error
OK, I am having this problem with a Joomla 2.5.11 site. I have renamed the htaccess.txt file to .htaccess. My URLs are (example) www.tomharris.us/index.php/coaching, but I want to get rid of the index.php in the URL. When I select Yes for Use URL Rewriting, I get 404s on all pages (except the Home page). The exact message is:
Not Found
The requested URL /about was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I have a couple of other J 2.5 sites that have never had this issue. One is a 2.5.11 and one is a 2.5.2.
I can't see any differences between these sites.
Any ideas?
Thanks!
Tom Harris
Not Found
The requested URL /about was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I have a couple of other J 2.5 sites that have never had this issue. One is a 2.5.11 and one is a 2.5.2.
I can't see any differences between these sites.
Any ideas?
Thanks!
Tom Harris
Last edited by toivo on Tue Oct 16, 2018 3:10 pm, edited 1 time in total.
Reason: mod note: split from someone else's topic
Reason: mod note: split from someone else's topic
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Feb 11, 2014 9:19 pm
Re: 404 Error when I use URL rewriting!
found the solution for me, and also the solution for the other person in this discussion:
http://docs.joomla.org/Enabling_Search_ ... _on_Apache
The problem for me and for the other person was that the website wasn't running on the domain, but in a subfolder after the backslash.
http://docs.joomla.org/Enabling_Search_ ... _on_Apache
The problem for me and for the other person was that the website wasn't running on the domain, but in a subfolder after the backslash.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Oct 20, 2010 3:26 am
- Location: Florida
- Contact:
Re: 404 Error when I use URL rewriting!
Possible solution.
I had a site running on a MAC via MAMP. Site was in a folder in the /htdocs.
SEF was on and RewriteBase/ was set correctly
.htaccess was named properly.
and there was no remnant htaccess.txt file either.
[but it just wouldn't ####n work for this site]
I noticed that the icon for .htaccess didn't seem correct (should have had espresso icon as that's my default .htaccess editor)
I tried a Get Info and noticed that the "actual" file name was ".htaccess.txt" but the extension was hidden so I couldn't see the txt in my every day use. The only way I could remove the txt extension was to do so in the Get Info.
This fixed everything.
Hope this helps.
I had a site running on a MAC via MAMP. Site was in a folder in the /htdocs.
SEF was on and RewriteBase/ was set correctly
.htaccess was named properly.
and there was no remnant htaccess.txt file either.
[but it just wouldn't ####n work for this site]
I noticed that the icon for .htaccess didn't seem correct (should have had espresso icon as that's my default .htaccess editor)
I tried a Get Info and noticed that the "actual" file name was ".htaccess.txt" but the extension was hidden so I couldn't see the txt in my every day use. The only way I could remove the txt extension was to do so in the Get Info.
This fixed everything.
Hope this helps.
-
- Joomla! Apprentice
- Posts: 6
- Joined: Tue Apr 29, 2014 8:28 am
Re: 404 Error when I use URL rewriting!
Hello!
The same thing - 404 when enable URL rewriting.
Tried to rename .htaccess, but not sure if I rename the correct file. I use wampserver, site is on my localhost. I renamed the .htaccess in wamp/www folder. Is it the correct file?
I have mod_rewrite on
Use joomla 3.2 (I see this is joomla 2.5 forum, but it seemed more relevant to post in topic for this error)
Thanks in advance!
Liva
The same thing - 404 when enable URL rewriting.
Tried to rename .htaccess, but not sure if I rename the correct file. I use wampserver, site is on my localhost. I renamed the .htaccess in wamp/www folder. Is it the correct file?
I have mod_rewrite on
Use joomla 3.2 (I see this is joomla 2.5 forum, but it seemed more relevant to post in topic for this error)
Thanks in advance!
Liva
-
- Joomla! Apprentice
- Posts: 18
- Joined: Sat May 24, 2014 8:58 am
- Location: JP
- Contact:
Re: 404 Error when I use URL rewriting!
I wonder if there is any sure shot solution to the 404 url rewriting.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Jun 19, 2012 3:50 pm
Re: 404 Error when I use URL rewriting!
I had this problem this afternoon. For whatever reason, my .htaccess file had nothing in it. I downloaded the .htaccess file from another site with the same version of Joomla, uploaded it to the site in question and everything works fine.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue Jan 25, 2011 7:15 am
- Location: Ahmedabad, Gujarat (India)
- Contact:
Re: 404 Error when I use URL rewriting!
There are some important tips that you need to consider.
You should use 301 redirects rather than 302 redirects when redirecting URLs on a site.
404 Error means web page not found. Web pages those return 404 - File Not Found for extended periods of time and that have valuable links should be 301 redirected to other web pages.
It is important to have customized 404 pages with recommended navigational options when website visitors request pages that return a 404 response code.
You should use 301 redirects rather than 302 redirects when redirecting URLs on a site.
404 Error means web page not found. Web pages those return 404 - File Not Found for extended periods of time and that have valuable links should be 301 redirected to other web pages.
It is important to have customized 404 pages with recommended navigational options when website visitors request pages that return a 404 response code.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Jul 13, 2015 9:04 am
Re: 404 Error when I use URL rewriting!
If you get a 404 error when using URL rewriting in global configuration -joomla dont stress
This is how to get it working:
Step 1 : Go to Filezilla and connect to the domain you are using.
Step 2 : Go to the public.html folder and look for htaccess.txt file.
step 3 : drag the file to your desktop and open it in notepad.When you are in notepad (ctrl + F) find the
# RewriteBase / line.
step 4: Remove the # - # RewriteBase / must now look like this - RewriteBase /
step 5: Save the notepad file as .htaccess
Step 6: Delete the original htaccess.txt file out of filezilla and add the .htaccess file in its place.
Now go to your joomla global configuration and by your SEO Settings make "Use URL Rewriting" - YES
Your index.php will be gone on the live site and it will only display the domain name now followed by the alias.
It worked on 5 different websites I am Using So hope this advice will help
Wimpie
This is how to get it working:
Step 1 : Go to Filezilla and connect to the domain you are using.
Step 2 : Go to the public.html folder and look for htaccess.txt file.
step 3 : drag the file to your desktop and open it in notepad.When you are in notepad (ctrl + F) find the
# RewriteBase / line.
step 4: Remove the # - # RewriteBase / must now look like this - RewriteBase /
step 5: Save the notepad file as .htaccess
Step 6: Delete the original htaccess.txt file out of filezilla and add the .htaccess file in its place.
Now go to your joomla global configuration and by your SEO Settings make "Use URL Rewriting" - YES
Your index.php will be gone on the live site and it will only display the domain name now followed by the alias.
It worked on 5 different websites I am Using So hope this advice will help
Wimpie
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Apr 04, 2016 2:17 am
Re: 404 Error when I use URL rewriting!
wimpie995 wrote:If you get a 404 error when using URL rewriting in global configuration -joomla dont stress
This is how to get it working:
Step 1 : Go to Filezilla and connect to the domain you are using.
Step 2 : Go to the public.html folder and look for htaccess.txt file.
step 3 : drag the file to your desktop and open it in notepad.When you are in notepad (ctrl + F) find the
# RewriteBase / line.
step 4: Remove the # - # RewriteBase / must now look like this - RewriteBase /
step 5: Save the notepad file as .htaccess
Step 6: Delete the original htaccess.txt file out of filezilla and add the .htaccess file in its place.
Now go to your joomla global configuration and by your SEO Settings make "Use URL Rewriting" - YES
Your index.php will be gone on the live site and it will only display the domain name now followed by the alias.
It worked on 5 different websites I am Using So hope this advice will help
Wimpie
Works in Joomla version 3.5.1.
Thanks!
-
- Joomla! Fledgling
- Posts: 2
- Joined: Mon Sep 26, 2016 6:09 pm
Re: 404 Error when I use URL rewriting!
This worked for me. thanks.
Step 1: Configure apache config file to enable .htaccess file
Ex. in /etc/apache2/apache2.conf, change AllowOverride none to AllowOverride All
<Directory "/home/user/public_html">
AllowOverride All
</Directory>
https://docs.joomla.org/Enabling_Search ... _on_Apache
Step 2: Copy the latest .htaccess file to your webroot, find the " # RewriteBase /" line and uncomment it
Step 3: Enable URL rewriting at Joomla backend.
https://www.joomlart.com/documentation/ ... sef-issues
Step 1: Configure apache config file to enable .htaccess file
Ex. in /etc/apache2/apache2.conf, change AllowOverride none to AllowOverride All
<Directory "/home/user/public_html">
AllowOverride All
</Directory>
https://docs.joomla.org/Enabling_Search ... _on_Apache
Step 2: Copy the latest .htaccess file to your webroot, find the " # RewriteBase /" line and uncomment it
Step 3: Enable URL rewriting at Joomla backend.
https://www.joomlart.com/documentation/ ... sef-issues
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Oct 16, 2018 10:43 am
Re: 404 Error when I use URL rewriting!
Thanks Andrew Williams you solved my problem.