Friendly URL does not load content

2

Well, I'm here with a problem in the url friendly, I'm doing the routes through the file .htaccess and get the values by $_GET . Only when I enter the url the content is not loaded, always trying to load and nothing.

htaccess file

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^estabelecimentos\/([a-zA-Z-0-9-_]+)\/ index.php?controller=estabelecimentos&option=tipo&tipo=$1 [QSA,L]
    
asked by anonymous 10.02.2015 / 21:57

1 answer

4

Your page does not load because it gives javascript error. Because your friendly URL contains a "subdirectory", the relative paths of your .js files become invalid.

You need to add a base tag in the head of your HTML.

<base href="http://sabeonde.pt/">

This tag will put http://sabeonde.pt/ before each relative URL when loading content.

    
10.02.2015 / 22:18