Pretty Url's and updating .htaccess file
Permalink
I am trying to enable the pretty urls and to update my .htaccess file. I am using dreamhost and there is an .htaccess in my ftp but it is blank right now - no code. When I select the pretty urls selection in settings on concrete 5 it gives a code and when i paste it to the ftp .htaceess file I then get a broken link page when trying to navagate my site. If I disable the pretty urls and delete the code, everything goes back to normal. What am I doing wrong?
When enabling pretty urls in concrete 5 the code I get is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
When I click on "save" it automatically enters into the .htaccess file as"
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
# -- concrete5 urls end --
this cause the broken link on my page atwww.www.watsonmediamarketing.com...
When enabling pretty urls in concrete 5 the code I get is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
When I click on "save" it automatically enters into the .htaccess file as"
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
# -- concrete5 urls end --
this cause the broken link on my page atwww.www.watsonmediamarketing.com...
Thank you for the help Jero. After trying your suggestion (sorry - it did not correct this particular issue). I did some more research and found that adding a "?" into the coding corrected the problem. The code in my .htaccess is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
the "?" is added into the line:
RewriteRule ^(.*)$ index.php/$1 [L]
after the php. So it reads:
RewriteRule ^(.*)$ index.php?/$1 [L]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
the "?" is added into the line:
RewriteRule ^(.*)$ index.php/$1 [L]
after the php. So it reads:
RewriteRule ^(.*)$ index.php?/$1 [L]
and
lines. I.E. make the rules unconditional.
I'd lay money on your next page request resulting in a 500 server error due to an unknown module.
Your domain name resolve back to Dreamhost. Doing a little Googling on "Dreamhost Mod Rewrite" reveals various users with this sort of problem.