URL Rewriting not working on one domain name

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.x extensions.

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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
ccgv
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Mon Aug 27, 2012 4:39 am

URL Rewriting not working on one domain name

Post by ccgv » Sat Nov 22, 2014 4:29 am

I have two domain names pointing to the same joomla installation. The URL Rewriting works great on the primary domain. calvaryofsummerville.org. There is not /index.php! for my second domain name ccsummerville.org. The home page comes up but the links don't work unless i put a /index.php/ in the URL. I'm sure I'm missing something, but not sure what. Do I need to modify my .htaccess file in my public web root or in my subdirectory where my joomla site resides? I tried different variations, but no luck.

itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4025
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: URL Rewriting not working on one domain name

Post by itoctopus » Sun Nov 23, 2014 1:23 am

You are probably missing the settings in the configuration.php file. You will need to ensure, in the configuration settings, that "SEF URLs" are set to "Yes" and "Use URL Rewriting" is also set to "Yes".
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30814
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: URL Rewriting not working on one domain name

Post by Per Yngve Berg » Sun Nov 23, 2014 9:01 am

Have you tried to uncomment "# RewriteBase /"?

ccgv
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Mon Aug 27, 2012 4:39 am

Re: URL Rewriting not working on one domain name

Post by ccgv » Sun Nov 23, 2014 12:14 pm

Per Yngve Berg wrote:Have you tried to uncomment "# RewriteBase /"?
It already is. One weird thing that I forgot to mention is that I have two .htaccess files that must be enabled. One in the public web root and one in the sub folder for my website. The root .htaccess file does the redirect to the sub folder and the .htaccess in the sub folder is the one that came with my Joomla installation which has the RewriteBase enabled.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44022
Joined: Sat Apr 05, 2008 9:58 pm

Re: URL Rewriting not working on one domain name

Post by Webdongle » Sun Nov 23, 2014 12:32 pm

ccgv wrote:I have two domain names pointing to the same joomla installation. The URL Rewriting works great on the primary domain. ...
If that were the case then you only have one Joomla installation ... yes ?
ccgv wrote:I have two .htaccess files that must be enabled. One in the public web root and one in the sub folder for my website. The root .htaccess file does the redirect to the sub folder and the .htaccess in the sub folder is the one that came with my Joomla installation
How are you connecting your two urls to one Joomla install ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

ccgv
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Mon Aug 27, 2012 4:39 am

Re: URL Rewriting not working on one domain name

Post by ccgv » Sun Nov 23, 2014 9:00 pm

Yes. I only have one joomla installation. The primary site, calvaryofsummerville.org is the default site. ccsummerville.org is the new site that I'm trying to redirect traffic.

Here is a copy of my .htaccess file that has the redirects in it.
************This the .htaccess in my public_html root. It's primary purpose is to remove the /cs off the URL.
******************
RewriteEngine on
RewriteRule ^$ cs/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} ^calvaryofsummerville\.org$ [OR]
RewriteCond %{HTTP_HOST} ^(www\.)?calvaryofsummerville\.org$ [OR]
#RewriteRule ^/?$ "http\:\/\/calvaryofsummerville\.org\/cs" [R=301,L]
RewriteRule !^cs/ /cs%{REQUEST_URI} [L]

************************
************************
The .htaccess in the root of my joomla directory of the site is the standard file with the RewriteRule uncommented out indicating the /CS subdirectory.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44022
Joined: Sat Apr 05, 2008 9:58 pm

Re: URL Rewriting not working on one domain name

Post by Webdongle » Sun Nov 23, 2014 10:47 pm

How can the /cs folder be reached if that part of the url is rewritten out of the url ?

And you still have not described how you have
ccgv wrote:have two domain names pointing to the same joomla installation
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

ccgv
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Mon Aug 27, 2012 4:39 am

Re: URL Rewriting not working on one domain name

Post by ccgv » Mon Nov 24, 2014 12:16 am

I'm not sure of the specifics of how the rewrite in the htaccess works but it took me a while to figure it out. It might be that in my hosting account I have it directing to the subfolder so it doesn't need to be displayed in the url. To answer your question, both domains are being directed to the subfolder from my hosting account configuration.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44022
Joined: Sat Apr 05, 2008 9:58 pm

Re: URL Rewriting not working on one domain name

Post by Webdongle » Mon Nov 24, 2014 1:04 am

OK
So
  1. /cs is the site root for both Domain names ?
  2. Both Domain names are TLD's neither is a subdomain ?
  3. Neither Domain name has had it's DNS records edited
  4. Neither Domain name is forwarded from another account ?
If all 4 are correct then what is left ? One of the Domain names hard coded in Joomla's .htaccess or in Joomla ?

url's please
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

ccgv
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Mon Aug 27, 2012 4:39 am

Re: URL Rewriting not working on one domain name

Post by ccgv » Mon Nov 24, 2014 2:35 am

Thanks, I don't think the url is hard coded into the joomla htaccess that I can see but I'm clueless when it comes to that file. Were those four things questions? The urls are www.Calvaryofsummerville.org when you access the site from this url, all menu items link great. The I url that is having issues is www.ccsummerville.org. the home page comes up but the menu items don't work. If I put insert a /index.php/ after the .org, the links work.
That is where the mystery for me.Thanks for the help.I know my boundaries and with this issue I'm stretched thin.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44022
Joined: Sat Apr 05, 2008 9:58 pm

Re: URL Rewriting not working on one domain name

Post by Webdongle » Mon Nov 24, 2014 10:27 am

Looking at both sites in http://centralops.net/co/ ... http://ccsummerville.org/ has a spf record 'v=spf1 a mx ptr include:secureserver.net ~all' but never added one myself so not sure if that would(or would not) affect rewrite.

You are on gdaddy servers ... never used those servers so don't know how they set things up.

calvaryofsummerville.org uses ns13.domaincontrol.com
ccsummerville.org uses ns01.domaincontrol.com
Could that be the cause ?

Suggest that you contact gddady and ask why rewrite is not working on ccsummerville.org
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

ccgv
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Mon Aug 27, 2012 4:39 am

Re: URL Rewriting not working on one domain name

Post by ccgv » Mon Nov 24, 2014 2:31 pm

Ok. Thanks.so that's helps. So you can confirm that things look setup correctly? I'll go back to godaddy with that information. The lady guy I talked to sounded like Jeff Spicole from "Fast Times at Ridgemont High"....if anyone else here has anything else or experience with go daddy in this scenario, please feel free to jump in.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44022
Joined: Sat Apr 05, 2008 9:58 pm

Re: URL Rewriting not working on one domain name

Post by Webdongle » Mon Nov 24, 2014 3:44 pm

It has to be the server handling the 2 TLD's differently because both TLD's are using the exact same files. Therefore the difference must be on the server after(or in the way) Joomla's index.php is called but before it is read.

Good luck with gddy they have a user account on here but it looks like they have given up trying to fix their problems http://forum.joomla.org/memberlist.php? ... e&u=139068
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

ccgv
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Mon Aug 27, 2012 4:39 am

Re: URL Rewriting not working on one domain name

Post by ccgv » Mon Dec 01, 2014 3:40 pm

Webdongle wrote:It has to be the server handling the 2 TLD's differently because both TLD's are using the exact same files. Therefore the difference must be on the server after(or in the way) Joomla's index.php is called but before it is read.

Good luck with gddy they have a user account on here but it looks like they have given up trying to fix their problems http://forum.joomla.org/memberlist.php? ... e&u=139068
Thanks for the input. So would it be wiser to just create a redirect instead of pointing my new domain to the same web root? If so, I'll just need to rewrite the URL so it doesn't show the old url in the address bar.

So if someone enters ccsummerville.org, it will redirect to calvaryofsummerville.org with that in the address bar. I'd like to phase that out, so how would I rewrite the URL when it is redirected?


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 3.x”