Microsoft
Software
Hardware
Network
Question : Need a bit of help on .htaccess appending folder name to url
I must admit I find apache rewrite rules even more cryptic than sendmail! I need a bit of help on the following transformation:
http://www.mydom.com
->
http://www.mydom/gohere/
If the user enters the first form (no subordinate folder), I want the URL to be rewritten as the 2nd form. However, if the user enters:
http://www.my.dom.com/else
where
then I don't want any rewrite. That is, if the user enters some subordinate folder name, fine, no worries, but if the user forgets to do that I want to default to "gohere".
How would I do that? I've tried:
RewriteRule ^$ gohere/
but that gives me:
http://www.mydom.com/usr/l
ocal/apach
e2/htdocs/
ohprs
not exactly what I'm looking for.
Answer : Need a bit of help on .htaccess appending folder name to url
Try the Redirect with a trailing slash:
Redirect 301 /
http://www.mydom.com/goher
e/
Random Solutions
restoring deleted files in u3 smart flash drive
Excel 2010 - Changing VLOOOKUP Values
Copy what user types in a text filed in to a hidden field
HTML site appearing full width in IE, not in other browsers, how to reduce size - center
System Center Configuration Manager - Changing the Fallback Status Point address for Internet-based clients
Apply module to article linked via front page
Belkin N+ wireless Router model number F5D8235-4 V2 Configure as Access Point .
SCCM Client Push Installation
How do I search my hard drive for files of a specified size or larger?
help blocking employees from accessing facebook