Expand my Community achievements bar.

SOLVED

dispatcher file accessibility

Avatar

Level 3

Hi,

 

We have 1 xml file(sample.xml) in dispatcher server, located under

"/mnt/var/www/html/" and able to access via "https://www.domain.com/in/en/sample.xml" URL.

 

we wanted to understand where this configuration is being set so it is accessible via "https://www.domain.com/in/en/sample.xml" URL.

 

Thanks,
Ajay Boddu.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

hi @Aj_9625932 

What the below rewrite does is 

RewriteRule ^/?(.+)$ /in/en/$1 [P]

 

it will looks for something like http://example.com/index.xml from the browser and once it reaches Apache , it adds the in/en so you can point to the right path.So in the end you achieve the same thing removed the in/en from browser but inorder to map to the file add the same through rewrite

 

http://example.com/in/en/index.xml

 

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @Aj_9625932 

You can use the below rule to add the in/en to the url

RewriteRule ^/?(.+)$ /in/en/$1 [P]

 

Also refer to the below link on how to enable the rewrites

https://www.axamit.com/blog/adobe/dispatcher-5

 

 

In case you want to test the same please use the below link

https://technicalseo.com/tools/htaccess/

 

 

Avatar

Level 3

Thanks.! I want to remove "/in/en" from the current URL.

 

FYI, this XML file is only present in Dispatcher server not in Author and Publish instances.

 

We are not sure where this configuration is being done,

XML file is there in dispatcher location "/mnt/var/www/html" and we are able to open that XML file via "http:www.domain.com/in/en/filename.xml".

but now we wanted this XML file to be opened via "http:www.domain.com/filename.xml".

Avatar

Correct answer by
Community Advisor

hi @Aj_9625932 

What the below rewrite does is 

RewriteRule ^/?(.+)$ /in/en/$1 [P]

 

it will looks for something like http://example.com/index.xml from the browser and once it reaches Apache , it adds the in/en so you can point to the right path.So in the end you achieve the same thing removed the in/en from browser but inorder to map to the file add the same through rewrite

 

http://example.com/in/en/index.xml