<p>OMG I'm so angry at myself!</p>

<p>Not <code>'omitScriptNameInUrls' =&gt; 'true',</code></p>

<p>but <code>'omitScriptNameInUrls' =&gt; true,</code></p>

CC BY-SA 3.0
2017-03-08T20:54:45.410Z
2017-03-08T20:54:45.410Z
Amanda Lutz
<p><code>.htaccess</code> is working fine. If I manually type <code>url.com/about</code> it shows the page. If I manually type <code>url.com/asdf</code> it shows 404 template page.</p>

<p><code>url.com/index.php/testPathInfo</code> shows <code>success</code></p>

<p>general.php has </p>

<pre><code>return array(
    '*' =&gt; array(
        'omitScriptNameInUrls' =&gt; 'true',
    ),
...
</code></pre>

<p>but when templates contain <code>{{ url('about') }}</code> or <code>{{ entry.url }}</code> I get <code>url.com/index.php?p=whatever-this-is-supposed-to-be</code></p>

<p>I'm probably missing something easy and obvious but I've been staring at it all morning. Could it still be the mod_rewrite enabled thing even though it's rewriting fine?</p>

<p>.htaccess content</p>

<pre><code>&lt;IfModule mod_rewrite.c&gt;
   RewriteEngine On
   RewriteBase /

   # Send would-be 404 requests to Craft
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
   RewriteRule (.+) index.php?p=$1 [QSA,L]
&lt;/IfModule&gt;

AuthType Basic
AuthName "*DEV*"
AuthUserFile /home/username/public_html/dev/.htpasswd
Require valid-user
</code></pre>

CC BY-SA 3.0
2017-01-24T19:35:32.720Z
Can you share your public `.htaccess` file contents?
Brad Bell
CC BY-SA 3.0
2017-01-24T19:37:20.130Z
Also, the title mentions multi-domain... can you clarify how that applies here?
Brad Bell
CC BY-SA 3.0
2017-01-25T14:37:45.250Z
@BradBell added .htaccess content to original question. I don't know if multi-domain applies here but thought I'd add the info. I'm currently working in "dev" subdomain.
Amanda Lutz
<url><config><multi-environment>
multi-domain setup: template entry.url includes index.php
# multi-domain setup: template entry.url includes index.php

(Asked by: username_0 on 2017-01-24)

.htaccess is working fine. If I manually type url.com/about it shows the page. If I manually type url.com/asdf it shows 404 template page.
url.com/index.php/testPathInfo shows success
general.php has 
return array(
    '*' => array(
        'omitScriptNameInUrls' => 'true',
    ),
...

but when templates contain {{ url('about') }} or {{ entry.url }} I get url.com/index.php?p=whatever-this-is-supposed-to-be
I'm probably missing something easy and obvious but I've been staring at it all morning. Could it still be the mod_rewrite enabled thing even though it's rewriting fine?
.htaccess content

   RewriteEngine On
   RewriteBase /

   # Send would-be 404 requests to Craft
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
   RewriteRule (.+) index.php?p=$1 [QSA,L]


AuthType Basic
AuthName "*DEV*"
AuthUserFile /home/username/public_html/dev/.htpasswd
Require valid-user

**Tags:** url, config, multi-environment

> **Comments:**
> **username_1**: Can you share your public `.htaccess` file contents?  
> **username_1**: Also, the title mentions multi-domain... can you clarify how that applies here?  
> **username_0**: @BradBell added .htaccess content to original question. I don't know if multi-domain applies here but thought I'd add the info. I'm currently working in "dev" subdomain.  

---

## 1 answers

### Answer by username_0 on 2017-03-08. Score: 3 | Accepted answer

OMG I'm so angry at myself!

Not `'omitScriptNameInUrls' => 'true',`

but `'omitScriptNameInUrls' => true,`


---

