How to check if mod_rewrite is enabled on your server

Forum closed, please submit your tips and tricks to: http://docs.joomla.org/Category:Tips_and_tricks
Forum rules
Please submit all new Tips and Tricks to: http://docs.joomla.org/Category:Tips_and_tricks

This forum section will be closed and removed eventually.
Locked
User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19121
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

How to check if mod_rewrite is enabled on your server

Post by leolam » Sat Nov 04, 2006 10:23 am

Many problems with SEO arise from the fact that a host has not enabled mod_rewrite (Apache setting) on the servers. They often tell they have (while they don't have) and you can verify if this is correct or not and if this is causing you Error 500 etc.

Here is how to check if mod-rewrite is realy enabled!

..Enable SEO in your administrator! (administrator> SEO > enable > save)

..Rename your htaccess.txt to .htaccess !!

Next place ONLY the following lines in your .htaccess:

Code: Select all

Options +FollowSymLinks
Redirect /joomla.html http://www.joomla.org
Now point your browser to: http://www.mysite.com/joomla.html

If it redirects you to joomla.org - mod_rewrite is working.
If it gives you an error - mod_rewrite is not working.

note: if your site is located in subdomain example "test" you need to insert in .htaccess as:

Code: Select all

Options +FollowSymLinks
Redirect /test/joomla.html http://www.joomla.org
note: replace the http://www.mysite.com with your own domain in your browser!

cheers
Leo

note: originally posted by Kenmcd on open-sef forum and modified/enhanced for general use
Last edited by leolam on Sat Nov 04, 2006 10:29 am, edited 1 time in total.
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
Member Joomla Bug Squad & Joomla CMS Release Team

renegadeandy
Joomla! Explorer
Joomla! Explorer
Posts: 313
Joined: Wed Mar 22, 2006 5:58 pm

Re: How to check if mod_rewrite is enabled on your server

Post by renegadeandy » Tue May 01, 2007 6:02 pm

hey! well - good news it forwards me to joomla.org

so what next!?

cooterrules
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun Apr 13, 2008 3:38 am

Re: How to check if mod_rewrite is enabled on your server

Post by cooterrules » Sun Apr 13, 2008 3:48 am

Thanks :D

User avatar
dingo1234
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Fri May 23, 2008 4:20 pm
Location: Netherlands
Contact:

Re: How to check if mod_rewrite is enabled on your server

Post by dingo1234 » Sat Jul 19, 2008 2:29 pm

In the .htaccess

I have to opt out this: Otherwise my site goes blanc
## Can be commented out if causes errors, see notes above.
#Options +FollowSymLinks

I did put in your suggestion:
Options +FollowSymLinks
Redirect /joomla.html http://www.joomla.org
This gives me a 500 message

does this mean I can't use mod_rewrite
I can't use SEF ??

(I strugled for a long time with SEF joomla core but always it makes the wrong URLs)

User avatar
snadowitz
Joomla! Guru
Joomla! Guru
Posts: 764
Joined: Wed Jan 18, 2006 4:40 am
Contact:

Re: How to check if mod_rewrite is enabled on your server

Post by snadowitz » Sat Jul 19, 2008 3:32 pm

This is an easier way - add this to the end of your .htaccess file:-

Code: Select all

RewriteRule (.*) http://google.com
Save it to your server and then try and navigate to your site - any page - they should all be redirected to google....IF mod_rewrite is working....
Snadowitz

User avatar
dingo1234
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Fri May 23, 2008 4:20 pm
Location: Netherlands
Contact:

Re: How to check if mod_rewrite is enabled on your server

Post by dingo1234 » Sat Jul 19, 2008 3:42 pm

I did put in as you said: RewriteRule (.*) http://google.com

This gave me: Error: Host Not Accessible

I think I have to go over to an other hosting firm in order to make SEF work ????

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19121
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: How to check if mod_rewrite is enabled on your server

Post by leolam » Sat Jul 19, 2008 5:01 pm

you did not do what i mentioned in the first post......check if your mod_rewrite is enabled which you can do by only inserting that little piece of code and nothing else...follow instructions maybe? ???

Leo 8)
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
Member Joomla Bug Squad & Joomla CMS Release Team

User avatar
dingo1234
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Fri May 23, 2008 4:20 pm
Location: Netherlands
Contact:

Re: How to check if mod_rewrite is enabled on your server

Post by dingo1234 » Sat Jul 19, 2008 6:51 pm

Sorry leolam, but I did put in earlier your first tip,ONLY put in
Options +FollowSymLinks
Redirect /joomla.html http://www.joomla.org
This gives a 500 message

when i use Option "FollowSymLinks" it gives me always blanco pages

BTW is there a SEF solution without using mod_rewrite ???

I have in a subdomain (same server) phpfox with full SEF running :'(
In this sub domain i have .htaccess with RewriteEngine On
I don't know why this is all happening to me

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19121
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: How to check if mod_rewrite is enabled on your server

Post by leolam » Sun Jul 20, 2008 2:28 am

dingo1234 wrote: BTW is there a SEF solution without using mod_rewrite ???
SH404SEF
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
Member Joomla Bug Squad & Joomla CMS Release Team


Locked

Return to “Submit Your Suggested Tips & Tricks to Docs.joomla.org now please.”