Forum Moderators: phranque
Using the .htaccess file
RewriteEngine On
Options +FollowSymLinks
rewriteRule ^tasks(/?)$ index.php?op=tasks$
rewriteRule ^projects(/?)$ index.php?op=projects$
If the folders tasks/ and projects/ exist, even empty, it works fine, but if they don't exist I get 404 not found.
I not that it should be possible to do this without creating folder, what is the trick?
The following rules, also don't work
RewriteRule ^tasks index.php?op=$1 [L]
RewriteRule ^projects index.php?op=$1 [L]
I have other .htaccess file on the main folder. Do you think that maybe I should put all the rules in the root(main) folder?
RewriteEngine On
Options +FollowSymLinks
rewriteRule ^tasks1/?$ index.php?op=tasks$
rewriteRule ^projects1/?$ index.php?op=projects$
and it works.
what it is the difference between tasks1 and tasks? I remove folders with names tasks/ and projects/ from the folder. There is something blocking this two names?
Now, this works
RewriteRule ^overview/tasks1/$ /~pbtz/temp/sqig/overview/index.php?op=tasks
this doesn't, gives 404
RewriteRule ^overview/projects/$ /~pbtz/temp/sqig/overview/index.php?op=projects
It seems to be some problem with the name /projects
since if I change it for something else, it works.
What can be blocking the use of this name?
I remove folders with names tasks/ and projects/ from the folder. There is something blocking this two names?If files or folders exist with that name, may be content negation. But anyway, that should not result in a 404 if negation takes place. If you don't use content negation and your server config enables MultiViews, disable the setting again:
Options -MultiViews