Electronics & Programming


Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 5, 2011 13:50:18

Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

mod_rewrite and {% url ... %}

I have a working .htaccess:

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !\.(gif|jpg|png|css|js|ico)$
RewriteRule (.*) /<wsgi_path>/$1

So the project that used to be athttp://www.<domain_name>/<wsgi_path>/

is apparently moved tohttp://www.<domain_name>/

which is what I intended.

However, all hyperlinks made with {% url ... %} now point tohttp://www.<domain_name>/<wsgi_path>/<and_so_on>/

I think I see why but fixing it is too subtle for me at this stage. Is this
a Django problem or a mod_rewrite problem?

On the Django wiki I found a reference to the flag. That led me to the
mod_rewrite dox and a reference to mod_alias. I tried this but it failed:

RewriteRule (.*) /<wsgi_path>/$1
Alias /<wsgi_path>/ /

Any help much appreciated. Thanks, Robin

You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.


Board footer

Moderator control

Enjoy the 13th of December

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support