User Tools

Site Tools


gallery2_issues_mod_rewrite

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
gallery2_issues_mod_rewrite [2009/03/31 06:22]
ben created
gallery2_issues_mod_rewrite [2013/03/19 05:25]
ben [Think I've got it]
Line 1: Line 1:
 +===== Problems with old links to gallery pages before moving to mod_rewrite =====
 Custom mod_rewrite rules in .htaccess (at the top) to fix broken URLs with main.php in them: Custom mod_rewrite rules in .htaccess (at the top) to fix broken URLs with main.php in them:
  
-[code]+<code>
 #THESE TWO FIX THE ISSUE of /main.php in the URL: #THESE TWO FIX THE ISSUE of /main.php in the URL:
 #More fixup for more than one "/​v/"​ in the URL: #More fixup for more than one "/​v/"​ in the URL:
Line 11: Line 12:
 RewriteCond %{REQUEST_URI} /​gallery2/​main\.php/​random ​     RewriteCond %{REQUEST_URI} /​gallery2/​main\.php/​random ​    
 RewriteRule . /​gallery2/​random [R=301,L] RewriteRule . /​gallery2/​random [R=301,L]
-[/code]+</code
 + 
 +Another issue exists whereby the problem of these nested main.php/v/ links are recursive- ​ I need to find a reg-ex to describe /​main.php/​[any number of /​v/​foo'​s].  Fun. 
 + 
 +Also, http://​www.benhall.com/​gallery2/​main.php/​v/​ with my re-write rules is broken, need to exclude it for Nothing after the /v/