开发者

"RewriteBase: argument is not a valid URL" error

开发者 https://www.devze.com 2022-12-25 17:36 出处:网络
I\'m trying to configure .htaccess of my website. http://213.175.210.49/~incisozl/ is the temporary url to the root(~/public_html/).

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/([^\开发者_StackOverflow中文版.\?/]+)/([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


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?


This is archaically old, but I just ran into this and for me the issue was having a slash on both the RewriteBase line and the RewriteRule line's destination. I took the slash off the destination and the error went away!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号