SEF and sub-folders

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

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.
User avatar
trogladyte
Joomla! Explorer
Joomla! Explorer
Posts: 369
Joined: Sat May 03, 2008 9:27 pm
Location: Phoenix, AZ
Contact:

SEF and sub-folders

Postby trogladyte » Wed Apr 18, 2018 1:58 pm

I have a main site, which is actually just a single landing page - https://www.norcalpulse.com. Below that, in a separate folder (not sub-domain) I have a site devoted to the Humboldt (CA) county - https://www.norcalpulse.com/humboldt.

I'm think this contributes to the issues I'm having. Normally, in .htaccess, I have this code:

Code: Select all

# 301 redirects

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html?\ HTTP/
RewriteRule ^(([^/]+/)*)index\.html?$ http://www.domainname.com/$1 [R=301,L]
#
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^(([^/]+/)*)index\.php$ http%2://www.domainname.com/$1 [R=301,L]
#
RewriteCond %{HTTP_HOST} !^(www\.domainname\.com)?$
RewriteRule (.*) http://www.domainname.com/$1 [R=301,L]

# End 301 redirects


However, I'm not sure how to format the URLs in the Rewrite lines when using a sub-folder. Currently, I DON'T have that in the .htaccess for the sub-folder domain. I have a stab at adding the sub-folder and it just made the site inaccessible.

I have SEF and URL rewriting turned on on the main landing page (though the issue I'm having is unaffected whether they are on or off), however, I get 2 different issues depending on whether I have SEF and URL Rewriting on or not for the sub-folder site.

1. BOTH ON - In this case, the sub-folder site opens correctly to its home page. If you mouse over a menu item, the correct URL for that item shows in the pop up at the bottom of the browser. However, clicking ANY menu item redirects you back to the landing page site.

2. SEF ON, URL REWRITING OFF - The home page of the sub-folder site resolves correctly, however, SOME images do not show, and, on inspection have a URL of images/image_name.jpg. The ones which do display are humboldt/images/image_name.jpg.

3. BOTH OFF - Everything is fine and dandy apart from ugly URLs.

While I use sub-folders all the time for development, I always have both settings off while developing so have never encountered this problem before. Some guidance would be most appreciated! Thank you!!
Ian Shere - Phoenix Website Design & Hosting
http://www.citruskiwi.com

User avatar
trogladyte
Joomla! Explorer
Joomla! Explorer
Posts: 369
Joined: Sat May 03, 2008 9:27 pm
Location: Phoenix, AZ
Contact:

Re: SEF and sub-folders

Postby trogladyte » Fri Jun 15, 2018 5:01 pm

Hi all, it's been 2 months and 180+ views but no response. I know this is an SEF rewriting issue, but cannot figure it out.

Please, some Joomla guru out there HELP!!!!! :-) Client is upset at their non-SEF URLs. Thanks.
Ian Shere - Phoenix Website Design & Hosting
http://www.citruskiwi.com

User avatar
trogladyte
Joomla! Explorer
Joomla! Explorer
Posts: 369
Joined: Sat May 03, 2008 9:27 pm
Location: Phoenix, AZ
Contact:

Re: SEF and sub-folders

Postby trogladyte » Fri Jun 15, 2018 8:00 pm

Nevermind, paid a free bucks on Freelancer and got it fixed in a few minutes - it was an .htaccess issue I was told, which is what I suspected. Just wasn't sure what!

However, I now have a different issue stemming from this same problem. SEF works (as long as I use SEF link paths where images are the link - cannot use the non-SEF link generated by Joomla). However, whenever a link is a category blog menu item (regardless of whether it's a non-SEF or SEF link), I lose images in the template (like the logo).

I did an inspect on a missing image, and found something is adding an extra parameter to the file path. So, if I go to https://norcalpulse.com/humboldt/outdoo ... the-giants there are no template images showing. For the logo (What's on in Northern California) the path should be:

https://norcalpulse.com/humboldt/templa ... 544071.png, but, becuase Avenue of the Giants is under Outdoor and Adventure, the path is:

https://norcalpulse.com/humboldt/outdoor-adventure/templates/ncp01main/images/logo-1121544071.png which doesn't exist - something is inserting the previous level name in the URL. If there was only one place this happened I'd say to heck with it and duplicate, but there are dozens if not hundreds of occurances, so duplication isn't an option.
Ian Shere - Phoenix Website Design & Hosting
http://www.citruskiwi.com


Return to “Administration Joomla! 3.x”

Who is online

Users browsing this forum: No registered users and 5 guests