Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: clean url okay, but no <a href requests works in the brow |
|
Author |
|
Adrian_u
Joined: 27 Mar 2020 Posts: 4 Location: Utrecht
|
Posted: Sat 28 Mar '20 12:14 Post subject: clean url okay, but no <a href requests works in the brow |
|
|
my apache environment:
- apache versie : 3.1.9 64 bit
- windows 10
- log files; cant make any sense of it
- php version 7.3.5
the htaccess code
Code: |
IndexOptions +FancyIndexing
RewriteEngine On
RewriteCond %{QUERY_STRING} query_var=query_param [NC]
#RewriteCond %{QUERY_STRING} query_var=(\w) [NC]
RewriteRule ^index_page /subdir2/index_page/ [QSD,R=302,L]
|
the commented rule is the rule that goes wrong.
When I use it, the query and param are not showed in the browser address bar.
The $_GET query is part of a menu called with a php/html <a href link, but only the start/default page of the menu is showed.
When using regex it collapses, and when resetting it back to the first query_var=query_param setting I get a clean url but only 1 php page showing up
I tried the following:
query_var=(/w)
but reading and googeling more and more makes me think it could be due to apache sever caching, as it works 1 time and then not anymore.
positive : url address bar is clean, the way its intended
negative: the pages are not called within the html/php menu except the landing page
I have been searching a lot online with google but cant find a solution so I would like to ask any kind of help from here to solve it. Anyone got an idea? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 28 Mar '20 15:29 Post subject: Re: clean url okay, but no <a href requests works in the |
|
|
Adrian_u wrote: | .
When I use it, the query and param are not showed in the browser address bar.
|
What browser do you use? Not all browses show that values until you click into the url bar...
A good way is to use the developer tools from your browser to check for those things.
How ever QSD removes the Query string. I think you should use QSA. |
|
Back to top |
|
Adrian_u
Joined: 27 Mar 2020 Posts: 4 Location: Utrecht
|
Posted: Sat 28 Mar '20 16:31 Post subject: Re: clean url okay, but no <a href requests works in the |
|
|
I tested it with several browsers: Edge, Chrome and Brave.
They all give the same output
Last edited by Adrian_u on Sat 28 Mar '20 17:06; edited 1 time in total |
|
Back to top |
|
Adrian_u
Joined: 27 Mar 2020 Posts: 4 Location: Utrecht
|
Posted: Sat 28 Mar '20 16:58 Post subject: |
|
|
Is it possible that a rewrite rule writes it to an older folder that is not used in any rule?
I'm sure its possible because the rewrite rule send it to a directory that is not in the htaccess script. How is this ever possible?
Is that the server cache?
Can I clean it ? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
Adrian_u
Joined: 27 Mar 2020 Posts: 4 Location: Utrecht
|
Posted: Tue 31 Mar '20 10:07 Post subject: |
|
|
Well the answer you give does not answer the question in the opening post.
Not sure if my question is not clear maybe?
Would you like me to ask the question in a better and more clear way? |
|
Back to top |
|
|
|
|
|
|