HTACCESS Change: Rewritre URL to insert domain

0

Good morning!

I have a site running today on Locaweb, and it has presented several problems of slowness and we believe it to be the server.

We are trying to migrate to Hostgator for testing, and we are using the temporary access address. But, this URL has a directory in the URL to access ( link ), and has compromised my friendly URL system.

My code:

<IfModule mod_rewrite.c>
    RewriteEngine On
    # URL Amigável
    RewriteRule ^(common|sistema|upload)($|/) - [L]
    RewriteRule !\.(css|js|xml|bmp|swf|flv|ico|html|pdf|woff|ttf|svg|eot|zip|mp3|jpg|png|gif|jpeg|ai|eps|ico)$ index.php [L]
</IfModule>

When I leave this active code, it does not even enter the site. I had to comment the RewriteRules to be able to access home. I believe it is due to the second RewriteRule having index.php. However, I tried adjusting by putting the directory:

RewriteRule !\.(css|js|xml|bmp|swf|flv|ico|html|pdf|woff|ttf|svg|eot|zip|mp3|jpg|png|gif|jpeg|ai|eps|ico)$ ~gpapr829/index.php [L]

Result: Error 500.

I've also tried:

RewriteRule !\.(css|js|xml|bmp|swf|flv|ico|html|pdf|woff|ttf|svg|eot|zip|mp3|jpg|png|gif|jpeg|ai|eps|ico)$ "/~gpapr829/index.php" [L]

It does not give 500 error, but it also does not work. Go to server 404.

What can I do in this case?

    
asked by anonymous 27.10.2016 / 15:34

0 answers