subdomains and pretty URLS set up

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
johnboyuk1
Forum Members
Forum Members
Posts: 192
Joined: Mon Nov 26, 2018 3:09 pm

subdomains and pretty URLS set up

Post by johnboyuk1 »

Can someone help me please with my set up! I 'm having trouble!

I have a CMS installation here

www.mydomain.com/myfolder

and a subdomain set up to point to that folder:

myfolder.mydomain.com

I have pretty URLs set up

At the moment, the homepage woks, but when I try and access any other page I get an 'internal server error' message.

For example

myfolder.mydomain.com/about-us

Gives the error

But myfolder.mydomain.com/index.php?page=about-us

Works ok

... which leads me to suspect its a pretty URL/url rewrite issue but I'm not sure what settings I should be using, here' the relevant bit from my htaccess:

Code: Select all

<IfModule rewrite_module>
	RewriteEngine on
	# If your CMSMS installation is in a subdirectory of your domain, you need to specify the relative path (from the root of the domain) here.
	# In example: RewriteBase /[subdirectory name]
	RewriteBase /myfolder
	
	# Rewrites URLs in the form of /parent/child/grandchild but only rewrites if the requested URL is not a file or directory.
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>
Can anyone help me out?

Thanks!
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1628
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: subdomains and pretty URLS set up

Post by DIGI3 »

If you're using a subdomain, then effectively the site is in root, so

Code: Select all

RewriteBase /myfolder
should be changed to

Code: Select all

RewriteBase /
Not getting the answer you need? CMSMS support options
johnboyuk1
Forum Members
Forum Members
Posts: 192
Joined: Mon Nov 26, 2018 3:09 pm

Re: subdomains and pretty URLS set up

Post by johnboyuk1 »

Ah! Thanks DIGI3 ...you're awesome ;)
Locked

Return to “CMSMS Core”