Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"RewriteBase: argument is not a valid URL" error

I'm trying to configure .htaccess of my website. http://213.175.210.49/~incisozl/ is the temporary url to the root(~/public_html/).

when I try to rewrite the url at .htaccess i get an

/home/incisozl/public_html/.htaccess: RewriteBase: argument is not a valid URL, referer: ht tp://213.175.210.49/~incisozl/inci-sozluk/somestring

error.

my rewrite rule is;

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /

RewriteRule ^/?$ /index.php [L]

RewriteRule ^inci-sozluk/([^\.\?/]+)/([0-9]+)/?$ /seo.php?process=word&q=$1&sayfa=$2 [L]

RewriteRule ^inci-sozluk/([^\.\?/]+)?$ /seo.php?process=word&q=$1 [L]

RewriteRule ^inci-sozluk/([^\.\?/]+)/([0-9]+)/([0-9]+)/?$ /seo.php?process=word&q=$1&sayfa=$2&gid=$3 [L]

RewriteRule ^inci-sozluktest/([^\.\?/]+)/([0-9]+)/([0-9]+)/?$ /seo.php?process=wordtest&q=$1&sayfa=$2&gid=$3 [L]

RewriteRule ^inci-sozluk-bugun/([^\.\?/]+)/([0-9]+)/?$ /seo.php?process=wordbg&q=$1&sayfa=$2 [L]

RewriteRule ^inci-sozluk-bugun/([^\.\?/]+)/([0-9]+)/([0-9]+)/?$ /seo.php?process=wordbg&q=$1&sayfa=$2&gid=$3 [L]

RewriteRule ^inci-sozluk-dun/([^\.\?/]+)/([0-9]+)/([0-9]+)/?$ /seo.php?process=worddn&q=$1&sayfa=$2&gid=$3 [L]

RewriteRule ^inci-sozluk-dun/([^\.\?/]+)/([0-9]+)/?$ /seo.php?process=worddn&q=$1&sayfa=$2 [L]
RewriteRule ^inci-sozluk-ters/([^\.\?/]+)/([0-9]+)/?$ /seo.php?process=wordts&q=$1&sayfa=$2 [L]

RewriteRule ^inci-sozluk-ters/([^\.\?/]+)/([0-9]+)/([0-9]+)/?$ /seo.php?process=wordts&q=$1&sayfa=$2&gid=$3 [L]

RewriteRule ^inci-sozluk-cvpters/([^\.\?/]+)/([0-9]+)/?$ /seo.php?process=cvpwordts&q=$1&sayfa=$2 [L]

RewriteRule ^inci-sozluk-cvpters/([^\.\?/]+)/([0-9]+)/([0-9]+)/?$ /seo.php?process=cvpwordts&q=$1&sayfa=$2&gid=$3 [L]

RewriteRule ^inci-sozluk-ileti/([0-9]+)/?$ /seo.php?process=eid&eid=$1 [L]

RewriteRule ^inci-sozluk-ileticvp/([0-9]+)/?$ /seo.php?process=cvpeid&eid=$1 [L]
</IfModule>

btw. it works fine when i use it with www.incisozluk.org pointed domain


1 Answers

That's strange since the only place where this error message is generated is in cmd_rewritebase() in modules/mappers/mod_rewrite.c and the code is

if (a1[0] != '/') {
  return "RewriteBase: argument is not a valid URL";
}

It tests whether the first character of the new value for RewriteBase is a /.
According to the code you've posted that is the case. Could there be another .htaccess file that has an invalid value?

like image 64
VolkerK Avatar answered Feb 03 '26 18:02

VolkerK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!