RewriteRule .htaccess problem

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
User avatar
LuaMadman
Forum Commoner
Posts: 35
Joined: Tue Jul 20, 2010 6:58 am

RewriteRule .htaccess problem

Post by LuaMadman »

Hello
Haveing som problem understanding what goes wrong with my RewriteRule.

Code: Select all

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^ascii/([a-z_]+)/?$ /ascii/display.php?f=$1.html [L]
If i type in the full address http://www.thedestruction.org/ascii/dis ... nalle.html
Then it shows just fine, but if I use the rewrite
http://www.thedestruction.org/ascii/nalle
Then I only see nalle.html.
Direct link bellow.
http://www.thedestruction.org/ascii/nalle.html
User avatar
LuaMadman
Forum Commoner
Posts: 35
Joined: Tue Jul 20, 2010 6:58 am

Re: RewriteRule .htaccess problem

Post by LuaMadman »

Solved it my self.

For starters, mod_rewrite was not enabled.
And apache2 is smart enought to guess that when i wrote /ascii/nalle in the url, that is should show nalle.html

I used the following guide to enable mod_rewrite Guide

While I was testing, i moved my files to /ascii/files/
So my new .htaccess looks like this.

Code: Select all

# Enable user / seo friendly links
Options +FollowSymLinks
RewriteEngine On

RewriteRule ^crashdummy/link([^/]*).html$ crashdummy/rewrite.php?link=$1 [L]
RewriteRule ^ascii/([a-z_]+)/?$ /ascii/display.php?f=files/$1.html [L]
Post Reply