.htaccess

.htaccess, a forum discussion on Jojo CMS. Join us for more discussions on .htaccess on our Administration (backend and configuration) forum.

Back to Forum Index : Back to Administration (backend and configuration)   RSS
AnthonyH

24 Nov 2007
Posts: 20

Hi was wondering how the .htaccess can be edited so Jojo will let non-jojo related parts of the site work rather than going to a 404 page.

So I have a wordpress blog but it won't work while I have jojo CMS installed on there as it keeps kicking the pages to the 404 page.

I have a few I want to allow but can't seem to tweak it to work.

Anyone have any suggestions?

Thanks for your advice in advance.
Harvey

Core Developer

Harvey

24 Nov 2007
Posts: 327

Hi Anthony,

Here's what works for me...

Replace the last line of the default .htaccess with the following 2 lines. This assumes your external content is in a folder called "wordpress".

RewriteCond %{REQUEST_URI} !^/wordpress/.*
RewriteRule ^(.*)$ index.php [L]


This assumes Jojo is running in the root of your web space - if you are running Jojo in a folder, then you will need to specify the folder in the .htaccess rule eg...

RewriteCond %{REQUEST_URI} !^/your-folder/wordpress/.*
RewriteRule ^(.*)$ index.php [L]


Hope this helps,

Harvey.
AnthonyH

25 Nov 2007
Posts: 20

Thanks for the quick reply Harvey.

I tried your suggestions so the last block of script looked like this:

# Everything else
RewriteRule ^$ index.php [L]
RewriteCond %{REQUEST_URI} !^/test/.*
RewriteRule ^(.*)$ index.php [L]

'test' is a test folder for it with an index file inside.

The test URL didn't work but by changing this script, it wouldn't load images either.

I then changed the last block of text to look like this:

# Everything else
RewriteRule ^$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/test/.*
RewriteRule ^(.*)$ index.php [L]

This script again wouldn't load the test/index page but the images would actually load in the site this time!

I've scouted around the web to try and find the answer, but nothing has come up trumps yet!!!
Back to Forum Index : Back to Administration (backend and configuration)   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.