0

I always see this error: (2019-02-07 12:31:48.595 [ERROR] [/home/shopph/domains/example.com/public_html/.htaccess:4] Invalid rewrite base: 'http://example.com/')

My codes in .htaccess are as follow:

Options All -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase http://example.com/
RewriteRule ^index\.php - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
#RewriteRule . index.php [L]
</IfModule> 

The aforementioned error prevent to run my program. I would be appreciated if you help me to tackle my problem. Best Regards

mohamad
  • 1
  • 3
  • You miss something in your `.htaccess` file . Can you post your `.htaccess` – Omer Tekbiyik Feb 07 '19 at 12:42
  • 2
    Possible duplicate of [What does RewriteBase do and how to use it?](https://stackoverflow.com/questions/21347768/what-does-rewritebase-do-and-how-to-use-it) – Shadow Feb 07 '19 at 12:45

1 Answers1

0

From what I understand of your situation you have to change:

RewriteBase http://example.com/

to

RewriteBase /

If it doesn't work, you have to give more details about your goal.

EvensF
  • 1,479
  • 1
  • 10
  • 17