mod_rewrite request
mod_rewrite request
Hi how is it going guys?
I am sorry, im English, so if there has been another topic with this discussion in it, I apologize, I wouldn't have known.
Anyways, I thought it would be a really cool idea to incorperate a mod_rewrite hack into the portal, where as links that look like http://www.blah.com/index.php?id=52,34,1,0,0,0 would turn out to be http://www.blah.com/52,34,1,0,0,0.html
I would do it myself on my own website but I dont know how you have the hardlinks/softlinks set up and where I would have to modify it.
But anyways, there is my request.
And good job on the completed documentation Oliver
I am sorry, im English, so if there has been another topic with this discussion in it, I apologize, I wouldn't have known.
Anyways, I thought it would be a really cool idea to incorperate a mod_rewrite hack into the portal, where as links that look like http://www.blah.com/index.php?id=52,34,1,0,0,0 would turn out to be http://www.blah.com/52,34,1,0,0,0.html
I would do it myself on my own website but I dont know how you have the hardlinks/softlinks set up and where I would have to modify it.
But anyways, there is my request.
And good job on the completed documentation Oliver
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
If you want links like "52,34,1,0,0,0.html" just create an .htaccess with following options:
RewriteEngine on
RewriteRule ^(.*)\.html$ index.php?id=$1
RewriteRule ^index.html$ index.php
Copy this .htaccess into the root directory (where phpwcms is installed).
Now you can access your page with:
your-domain.tld/index.html
your-domain.tld/52,34,1,0,0,0.html
I will look in the next days for a better soloution like
your-domain.tld/52/34/1/0/0/0.html
or
your-domain.tld/52-34-1-0-0-0.html
Cheers
Torsten Wenzel
RewriteEngine on
RewriteRule ^(.*)\.html$ index.php?id=$1
RewriteRule ^index.html$ index.php
Copy this .htaccess into the root directory (where phpwcms is installed).
Now you can access your page with:
your-domain.tld/index.html
your-domain.tld/52,34,1,0,0,0.html
I will look in the next days for a better soloution like
your-domain.tld/52/34/1/0/0/0.html
or
your-domain.tld/52-34-1-0-0-0.html
Cheers
Torsten Wenzel
That's a good solution, but you'd still want the links generated by WCMS to use the MODRewrite so there would be some coding that had to happen. Of course, this is beyond my skills.
And for thoes who don't know why people want this... Many search engines don't like to index URLs with questionmarks in them. Using ModRewrite is a way around this.
And for thoes who don't know why people want this... Many search engines don't like to index URLs with questionmarks in them. Using ModRewrite is a way around this.
found a solution
Hi guys, just wanted to let you know that I have found a solution, but have only tested it on the downloads part of phpwcms.
Would let you use:
http://www.blah.com/download/32/42/48.html
Instead of:
http://www.blah.com/download.php?id=32,42,48
--
I am currently working on altering the phpwcms code to output of these kind of links, but it will take a while since there are thousands of lines of code to overview so I dont disturb the output of the hard links.
Code: Select all
RewriteEngine On
RewriteRule ^/download.php?id=([0-9]*),([0-9]*),([0-9]*$) /download/$1/$2/$3.html
http://www.blah.com/download/32/42/48.html
Instead of:
http://www.blah.com/download.php?id=32,42,48
--
I am currently working on altering the phpwcms code to output of these kind of links, but it will take a while since there are thousands of lines of code to overview so I dont disturb the output of the hard links.
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
howto
greetings marc