0

I got a website done by a freelancer now he is missing and I don't know how to fix this.

This is my problem, I uploaded the script to website root (www.lanka.deals) but the problem is it rewrite index to /deals/ (www.lanka.deals/deals/) but I need to make it as (www.lanka.deals) edited base URL in Application/config/config.php still nothing.

Here is my htaccess:

DirectoryIndex index.html index.php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]
</IfModule>

if any more information needed please tell me I will post them.

1 Answer 1

0

CodeIgniter .httaccess code recommendation :

<IfModule mod_rewrite.c>
    RewriteEngine On
    # !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
    # slashes.
    # If your page resides at
    # http://www.example.com/mypage/test1
    # then use
    # RewriteBase /mypage/test1/
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

Hope it helps.

EDITED

If your base_url is : http://www.lanka.deals/, then your RewriteBase is just slash : /

But if your base_url is : www.lanka.deals/deals/, then your RewriteBase should be : /deals/

It's all depends from how to you access your site from the URL (CodeIgniter base_url)

Sign up to request clarification or add additional context in comments.

3 Comments

when it set to "RewriteBase /deals/" it shows me a 500 Internal Server Error
thank you for the answer. but it still points to "www.lanka.deals/deals", I want to make it "www.lanka.deals" so badly :(
@DreammediaRulz Check your base_url and your .htaccess. Please rate up and checklist my answer if that is helped you :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.