Forum Moderators: phranque
[mydomain.com...] Title
I want this to become:
[mydomain.com...]
* Notice spaces are converted to hyphens.
I'm needing either someone to post a solution or give someone which explains real basically for me.
Would greatly appreciate it.
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^foo\.html$ /bar.html [L]
Request "foo.html" from your server, and you should see the contents of "bar.html".
If it doesn't work, see your server error log -- it often gives very good information about the problem.
For more information on rewriting URLs, see jd01's recent excellent post [webmasterworld.com].
If you are on Apache 1xx, then there is a common error that often prevents rewriting of php URLs. In many cases, the Loadmodule order is incorrect, and php is invoked before mod_rewrite can have any effect. If this is the case, then make sure that php is loaded before mod_rewrite. Yes, that is "before" -- On Apache 1xx, modules are executed in reverse order from the load list. On Apache 2xx, this is not a problem because module priority is handled seperately from load order.
Jim
This for example should do the trick:
RewriteEngine on
RewriteRule ^(.*)/(.*)$ view.php?$1=$2
But I'm just getting an Internal Server Error
Options +FollowSymLinks
RewriteEngine on
RewriteBase /lyrics
RewriteRule ^(.*)_(.*)$ $1\ $2 [S=1]
RewriteCond %{SCRIPT_FILENAME}!^.*view.php
RewriteRule ^(.*)/$ view.php?song=$1 [L]
Doubt I'll get a response for this but am needing help with 'conical'(sp?) urls where I have an add-on domain which I want to be the exlusive url for a subdirectory. So although the add-on domain wil load the right page, I don't want links from there to use the main server url and want it to continue using the add-on domain ..
any idea of how this would be done?