Jump to content

Mod Rewrite generator?


bingwalker

Recommended Posts

You missed the preceding URL off your example and perhaps some other information - so I assume "gowns" is a subdir from root and there are no other conditions

Assume no redirection - just rewriting

Original URL in browser bar

Will accept domain.com/gowns/?p=46  (folder location properly terminated with /)

Will not accept domain.com/gowns?p=46 (since this is assumed a folder)

Case conversion on paths ignored (todo but prob not required)

Version for httpd.conf not .htaccess (requires a RewriteBase / for .htaccess and no prefix / on RewriteRule

Force target as /index.htm (not recommended but avoids secondary rewrite probs. appending index file)

 

Try ...

 

RewriteEngine ON
#RewriteLogLevel 9
#RewriteLog logs/rewrite.log
RewriteCond %{QUERY_STRING} ^p=([0-9]+)$ [NC]
RewriteRule /gowns/$ /christening-gowns/p/%1/index.htm [NC,L]

Link to comment
https://forums.phpfreaks.com/topic/85963-mod-rewrite-generator/#findComment-439284
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.