Here's what I've so far:
- Code: Select all
RewriteRule ^pages/([0-9A-Za-z_]+)/(.+)(.\html|/)$ /index.php?page=$1§ion=$2 [L]
RewriteRule ^pages/([0-9A-Za-z_]+)/(.+)(.\html|/)$ /index.php?page=$1§ion=$2 [L]
#this will catch both the / and no /
RewriteCond %{REQUEST_URI} /([^/]+)/([^/]+)/?$
RewriteRule ^pages/.*$ /index.php?page=%1§ion=%2 [L]
# this will do the .html
RewriteRule ^pages/([^/]+)/([^/]+)\.html$ /index.php?page=$1§ion=$2 [L]
have a try onYes, I know I could easily achieve that using two rules; but I want it all in one
RewriteRule ^pages/([a-z0-9_-]+)/([a-z0-9_-]+)(\.html|/)?$ /index.php?page=$1§ion=$2 [NC,L]
Return to Friendly URLs with Mod_Rewrite
Users browsing this forum: No registered users and 51 guests