0

I've got a CMS installed in a sub-directory of my webspace and I'm having a little trouble figuring out how to configure the htaccess file.

mysite.com contains a splash page that should stay there for now. The idea is that mysite.com/dev should open the index page of the CMS. I suppose I could go with a subdomain but I'll have to research what to do in this case. Either way all of this is just temporary so whatever works is good.

You can see from the below code I've been messing around and I've commented out a lot of stuff. (I've also not bothered to copy more that I think is probably nonsense.)

#Display PHP Errors
php_flag display_errors Off

RewriteEngine On
RewriteBase /

#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.mysite\.com\dev [NC]

# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /dev/index.php?q=$1 [L,QSA] 

I should note that I'm with a hosting company any my root path is something like

/content/hosting/l/u/mysite.com/web

I've tried to add this (and truncated versions) to my htaccess file but without success.

Bert Murphy
  • 37
  • 1
  • 7
  • Still no luck on this. I set the RewriteBase to /dev/ (as per here - http://stackoverflow.com/questions/704102/how-does-rewritebase-work-in-htaccess) and then messed around with the Rewrite conditions. – Bert Murphy Jul 11 '14 at 00:01

1 Answers1

0

If dev is your CMS and you want site/dev to open index.php in dev, your htaccess file for dev only needs this line:

DirectoryIndex index.php
zx81
  • 41,100
  • 9
  • 89
  • 105