0

Now i indexed my site for testing purpose inside a sub folder like www.example.com/test but it is not working properly. But when i change the url like www.example.com/test/index.php it is working.

This is my .htaccess file

RewriteEngine On

    # Removes index.php from ExpressionEngine URLs
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]

Thanks in advance.

0
0

Ok this is a very poor quality question, you don't say what you're trying to achive at all, and it doesn't sound like you've searched for your answer at all or you'd have found the manual pages (that cover sub directories) : https://www.google.co.uk/search?q=expressionengine+in+a+sub+directory&ie=utf-8&oe=utf-8&gws_rd=cr&ei=dnVxVZzAGMqI7Abj5IN4

Still, it sounds like your trying to get frienly URL's working in a sub-directory from the htaccess, therefor here's the answer (without explanation) :

 # Removes index.php from ExpressionEngine URLs
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ test/index.php/$1 [L]

Now, url's like www.mysite.com are re-written to www.mysite.com/test/index.php.

You'll also need to set your base URL to www.mysite.com of course.

Lastly you mention indexing in your title, I'm assuming you mean you can't access index.php? Indexing is a very different activity that search engines and crawlers (non exclusively) use ...

Ref : Remove index.php and subdirectory in url string

Not the answer you're looking for? Browse other questions tagged or ask your own question.