开发者

URL Rewriting on godaddy hosting

I've just uploaded my site to GoDaddy hosting and experiencing some problems with URL rewriting. Google is full of similar complains but non of the fixes that help the others did the trick for me.

My .htaccess file looks like this:

DirectoryIndex index.php
AddDefaultCharset utf-8

RewriteEngine on
Options +FollowSymlinks -MultiViews -Inde开发者_高级运维xes   
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?path=$1 [L,QSA]

I get processing redirected to index.php as expected, but for http://example.com/products my $_GET array looks like this:

array(
    [404;http://example_com:80/products] => ''
)

but should look like this:

array(
    [path] => '/products'
)

I can't understand what this means.

Here are common solutions of peoples problems found in google:

  • Add Options +FollowSymlinks -MultiViews

  • Add RewriteBase /

  • Add perpending slash to index.php in rewrite rule

My .htaccess had first two originally, and I added slash to index.php and waited two hours, but it's still the same.

Any ideas?


Could't find a way to fix this problem. Needed to code a workaround...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜